I tried implementing dragging on android in 2 ways:
- Canvas with on draw.
- Relative layout with margins changes on touch.
It’s not smooth enough, even on strong devices.
How can I make dragging faster?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The easiest way (and most responsive) is to handle touches in your view, and when you handle a
MotionEvent.ACTION_MOVE, simply set yourView‘s x and y points from the event’s raw coordinates and callview.invalidate().