Here is my scenario: a LinearLayout
as the main layout of the Activity
. The Layout contains an ImageView
which has its own onClickListener
.
What would be the easiest way to fire the ImageView
listener while the user rests his finger on the screen. This is a general scenario where the user is holding the device and touches the screen by mistake(so a onTouch fires) but wants to press the ImageView
. In this case, since the screen is already touched, when pressing he ImageView
, nothing happens.
I guess you can achieve same by using ACTION_DOWN & ACTION_POINTER_DOWN, where later is for second touch. You need to handle these events in your touchlistner. This listener can be on your root layout.
See here, some excerpts are :