Tuesday, July 5, 2011

[android-developers] Which button is clicked in my activity

Hi all,

I'm having a beginner issue. Sorry if my issue looks pathetic.

I've got a custom button class so that I can declare lots of custom
button objects in my Activity. The buttons are declared via an XML
file. Each button is identified by a different text inside it
( setText("blabla") ).

I'd like to update the text of a label Alpha in my Activity depending
on which button has been pressed.
How do I do (considering I've got hundreds of buttons) to identify
which button was pressed?

ex:
public class MyActivity extends Activity implements OnClickListener {
}

public class MyCustButton extends Button {
}


Thanks.
Best regards.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate