Android Drag and drop of button

前端 未结 3 619
旧时难觅i
旧时难觅i 2021-01-05 22:28

I am working in android, I am using a button. Now I want to perform drag and drop of this button.

This is my main.xml

 

        
3条回答
  •  被撕碎了的回忆
    2021-01-05 23:11

    Try returning true from onTouch() method. That might work out. In one of my app it worked as return false was not moving the view as per my touch movement but return true statement solved it.

提交回复
热议问题