Hi,
In android, is there such a thing for listening if a View is pressed? In background drawable, i can set assert depends on the view is pressed or not.
Is it possible for me to add a Listener for a View when I pressed it?
Thank you.
Hi,
In android, is there such a thing for listening if a View is pressed? In background drawable, i can set assert depends on the view is pressed or not.
Is it possible for me to add a Listener for a View when I pressed it?
Thank you.
This is what the Button class is for. It doesn't have to "look" like a button to be one.
You can set and OnClickListener to any View, which is the base class for just about everything in Android!