I'm not aware of any way to do that, but that doesn't mean it's not out there. I'd be curious to see the use case behind a single activity that has 50 buttons.
-- Chris Stewart http://chriswstewart.com Fantasy Football<http://chriswstewart.com/android-applications/fantasy-football/>- Android app for fantasy football fanatics and MFL owners Social Updater<http://chriswstewart.com/android-applications/social-updater/>- An easy way to send your status blast to multiple social networks On Tue, Aug 17, 2010 at 1:32 PM, Filip Havlicek <[email protected]>wrote: > Hi, > > do I understand it right that you have one onClickListener instance for all > the buttons? Why? Just why? > > Filip Havlicek > > 2010/8/17 Bhavya Siddappa <[email protected]> > > Hi All, >> >> I have an activity with 50 buttons. Want to avoid writing 50 switch cases >> for onClick listener events. >> >> Is their a way to map the buttons with its respective loading of UI in XML >> format and avoid writing Java code. >> >> Any pointers would be appreciated. >> >> Thanks, >> >> - Bhavya >> -- >> 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]<android-developers%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en > > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- 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

