[android-developers] Re: Multi-touch with multiple buttons

2011-12-01 Thread ColletJb
Thanks a lot to all of you for your help. I will try this asap and tell you if i did it ;) On 30 nov, 23:18, Dianne Hackborn wrote: > Well Android started without any multi-touch API at all, a simple version > was added in an update (with the constraint that the platform itself > couldn't use it

Re: [android-developers] Re: Multi-touch with multiple buttons

2011-11-30 Thread Dianne Hackborn
Well Android started without any multi-touch API at all, a simple version was added in an update (with the constraint that the platform itself couldn't use it for anything), and it has been evolving since then. I certainly agree that the initial API was difficult to use for some common things, bec

[android-developers] Re: Multi-touch with multiple buttons

2011-11-30 Thread niko20
Dianne I appreciate your help in the forums and your hard work on Android. However, I think you even have to admit that multitouch, at least in its original form, is a poorly implemented, complicated API. If they cleaned it up as of Android 3.0, that is good news for devs. -niko On Nov 30, 2:45 p

Re: [android-developers] Re: Multi-touch with multiple buttons

2011-11-30 Thread Dianne Hackborn
On Mon, Nov 28, 2011 at 6:21 AM, niko20 wrote: > I guess in Android 3.2 they now allow multitouch to go the multiple > views. But I have not tested it. > This was added in Android 3.0, and it does work. > Whoever thought of the one view thing is a moron, period. It should > have just worked. B

[android-developers] Re: Multi-touch with multiple buttons

2011-11-30 Thread al
getRawX/Y return the absolute coordinates off the current event on the screen (i.e. they are not relative to the view that received the coordinates). I don't know about getLocalVisibleRect(). It's not documented in the api docs. It may return coordinates relative to the parent view? In that case, i

[android-developers] Re: Multi-touch with multiple buttons

2011-11-29 Thread ColletJb
Thanks for your answer. I tried what you mentioned and put this on my onTouch method: this.aRect = new Rect(); this.aBtn.getLocalVisibleRect(aRect); if(aRect.contains((int)event.getRawX(), (int)event.getRawY())){ Log.i(TAG, "inA"); if(action == MotionEvent.ACTION_DOWN){

[android-developers] Re: Multi-touch with multiple buttons

2011-11-29 Thread al
There are some basic "principles" in android regarding multi-touch that you should be aware of. Especially, wrt. your code these two come to my mind: 1) If the first "finger" touches view A, all other touches will be directed to view A as long as the first finger is still there, even if the subsequ

[android-developers] Re: Multi-touch with multiple buttons

2011-11-28 Thread ColletJb
arf, thanks for your help, but for such a "basic" feature, it seems really complicated... :'( On 28 nov, 16:06, Kostya Vasilyev wrote: > You may want to look at the framework sources for this: > > http://www.grepcode.com/file/repository.grepcode.com/java/ext/com.goo... > > 28 ноября 2011 г. 18:55

Re: [android-developers] Re: Multi-touch with multiple buttons

2011-11-28 Thread Kostya Vasilyev
You may want to look at the framework sources for this: http://www.grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.3.5_r1/android/view/ViewGroup.java#824 28 ноября 2011 г. 18:55 пользователь ColletJb написал: > could be an idea, I ve found on the web a tuto exp

[android-developers] Re: Multi-touch with multiple buttons

2011-11-28 Thread ColletJb
could be an idea, I ve found on the web a tuto explaining how to manage multi-touch event with an image (in order to zoom it), but not with 2 or more sub-views... i would then have to calculate the place on the screen of both buttons and calculate if the pointer is in one of them. Is this a good a

[android-developers] Re: Multi-touch with multiple buttons

2011-11-28 Thread ColletJb
Thanks Niko20 for your answer... Do you have any idea how game running Android 2.0+ do ? On 28 nov, 15:21, niko20 wrote: > Unfortunately Android's multitouch design is completely idiotic and > does not allow multitouch events to go to two different views at the > same time. You can only capture

Re: [android-developers] Re: Multi-touch with multiple buttons

2011-11-28 Thread Kostya Vasilyev
What about a transparent view that covers the entire activity? 28 ноября 2011 г. 18:21 пользователь niko20 написал: > Unfortunately Android's multitouch design is completely idiotic and > does not allow multitouch events to go to two different views at the > same time. You can only capture multit

[android-developers] Re: Multi-touch with multiple buttons

2011-11-28 Thread niko20
Unfortunately Android's multitouch design is completely idiotic and does not allow multitouch events to go to two different views at the same time. You can only capture multitouch on *one* view. I guess in Android 3.2 they now allow multitouch to go the multiple views. But I have not tested it. W