tags:

views:

32

answers:

2

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.

A: 

This is what the Button class is for. It doesn't have to "look" like a button to be one.

RickNotFred
+1  A: 

You can set and OnClickListener to any View, which is the base class for just about everything in Android!

CaseyB