Reputation: 1982
Framework: Android
I have a TextView
where I would like to change the text on keeping an ImageView
pressed.
Note: I am not referring to changing the text on clicking the view, but on pressing the view and on the amount of time that it is pressed.
e.g. I press the image and the text becomes 2
. Keep it pressed for another half a second and the text becomes 3
.
I haven't found a similar question yet, yet if you have, please redirect me. Thank you.
Upvotes: 0
Views: 59
Reputation: 1811
Make use of OnTouchListener
and run your number changing algorithm in ACTION_DOWN
Upvotes: 1