Wow all this is so confusion I want to develop my own apps mainly games but
I don't think ill be able to I really don't understand any of this HAHAHA

On Dec 10, 2008 12:14 PM, "Josh Dobbs" <[email protected]> wrote:

Hi Mark,

Can you elaborate on building a map or point me to the correct
documentation. I looked at the class index and their are several maps and im
not quite sure what you mean. What advantaged does a map have over an array?




On Wed, Dec 10, 2008 at 4:58 AM, Mark Murphy <[email protected]>wrote:

>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to