I'm trying to make a single onClickListener for several views. I have
successfully done this for buttons that do the same thing (such as
change the background image of the button clicked), but I want to be
able to refer to what button has been pressed for some actions within
the onClick() method. My understanding of views suggested that
R.id.myClickedView should equal view.getId() inside of the onClick()
method, but my
if(R.id.myClickedView == view.getId()) { }
loop is never entered, and the debugger shows these two values to be
different.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en