Josh wrote: > can i access a widget if i know it's id. For example if i have the > following > > String myWidget = btn1;
FWIW, R.id.btn1 would be an int, not a String. > can i do something like this in order to get a reference to the widget > and change it's background color? > Button btnTmp = (Button) findViewById(R.id.myWidget) No. If you want to look up widgets by Strings, I think you will need to build yourself a Map. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Published! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" 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-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

