Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Single touch in ANDROID

Is it possible to allow the user to touch the screen only once?

Meaning: A user touches the screen and if he tries to touch the screen again nothing will happen. I am implementing the approach using canvas to draw the objects on the screen.

Thank you in advance!

like image 848
chikito1990 Avatar asked Dec 17 '13 11:12

chikito1990


1 Answers

From what you have in mind, setClickable() or onTouchEvent would be the best way to go.

Have a look on this reference:

  • Responding to Touch Events

  • Disable All Touch Screen Interactions While Animation

  • setEnabled() vs setClickable(), what is the difference?
like image 150
Avanz Avatar answered Sep 28 '22 18:09

Avanz