Skip to content Skip to sidebar Skip to footer

Programatically Execute Another Touch Event When One Touch Event Occures In Android

I am making ImageView Drag and drop with creating duplicate instance by touching original one. I am having one horizontal-layout containg many small images. when I touch on it it c

Solution 1:

It sounds like what you want to do is click "Image1", have this action create an "Image2" and continue the touch gesture as if it was clicked on "Image2"?

Instead of doing this it might be a better idea to have a Touch Surface - An invisible view layered above these view's which captures the touch event and then performs the actions as needed - this will mean you can continue your gesture "off" the image without creating a new gesture.

Solution 2:

If I understand the problem right, you need to return false in img2's onTouch method in order to return the touch to the dispatcher (img22).

Post a Comment for "Programatically Execute Another Touch Event When One Touch Event Occures In Android"