Android:Multi touch doesn't work as expected?
Posted
by user187532
on Stack Overflow
See other posts from Stack Overflow
or by user187532
Published on 2010-03-17T19:22:13Z
Indexed on
2010/03/17
19:41 UTC
Read the original article
Hit count: 541
android
Hi folks,
Help me in resolving the below issue.
I have three image buttons on screen. All these three buttons controlled under ontouchlistner as below.
buttonOne.setOnTouchListener(this); buttonTwo.setOnTouchListener(this); buttonThree.setOnTouchListener(this);
I override "public boolean onTouch(View v, MotionEvent event)". Under this i check for these three image buttons touch events like below.
ImageButton imageBtn = (ImageButton) v;
if ( imageBtn == buttonOne ) // first button touch
..Log..
else if ( imageBtn == buttonTwo )
..Log..
else if ( imageBtn == buttonThree ) // first button touch
..Log..
My problem is, as it is under multi touch event handler like above, it does not detect when touch all three button at a time to try to produce multi touch effect, instead it detects only one imagebutton touch at a time even though i touch all three image buttons. As i am developing this project on Android 1.6 SDK, is there any problem accessing my requirement(multi touch) (or) it is a known issue? I am hoping that, when it works for single button touch, why shouldn't it work when clicking three imagebuttons at a time to produce three logs printed as per my above code?
How do i resolve it for my case?
Please don't question me why i am still developing on 1.6 for such a requirement.
Thank you. Appreciate your suggestions !
© Stack Overflow or respective owner