Scenario:
There are two activities…
Activity A has an imagebutton to launch an intent to show Activity B on screen.
Activity B has an imagebutton to finish() itself and cause Activity A to be shown.
These buttons are at the same location on each activity
Problem:
in Activity B, when I double-tap the button (instead of single tap), Activity A becomes visible but quickly shows Activity B again !
the second touch event seems to carry through to Activity A and it would seem that I could fix this problem by clearing some touch buffer in onCreate() of Activity A.
How can this be done? Or is there another fix ?
I’ve reproduced this on the emulator (2.2) and on the phone (2.3.3)
Double tap isn’t really a common android event. It sounds like your click is not coming through one activity to another (which I think is impossible) but that you are clicking once on B and once on A.
What you could do is in onActivityResult() capture the time, and don’t like people click the imagebutton for like 0.3seconds or something after the activity result.