Programatically execute another touch event when one touch event occures in android

后端 未结 2 357
臣服心动
臣服心动 2021-01-24 03:40

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

相关标签:
2条回答
  • 2021-01-24 04:25

    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).

    0 讨论(0)
  • 2021-01-24 04:32

    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.

    0 讨论(0)
提交回复
热议问题