Pressed Listener for a View
In android, is there such 开发者_JAVA百科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.
You can set and OnClickListener to any View, which is the base class for just about everything in Android!
This is what the Button class is for. It doesn't have to "look" like a button to be one.
精彩评论