[android-developers] Re: Use dynamic string instead of Integer in findViewById

2008-09-04 Thread Kavi
I'll try both and see which one works better Thanks Mark and Romain Guy. . --~--~-~--~~~---~--~~ 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@googlegrou

[android-developers] Re: Use dynamic string instead of Integer in findViewById

2008-09-04 Thread Romain Guy
Hi, You could also find by id the container of all the children you need and iterate over its children using getChildCount() and getChildAt(). Note that there is also a way to get an id's integer using its name as a String. Use Context.getResources().getIdentifier(): http://code.google.com/andr

[android-developers] Re: Use dynamic string instead of Integer in findViewById

2008-09-04 Thread Mark Murphy
Kavi wrote: > Currently, findViewById uses a R.id.viewid which is an Integer to find > views. > > Is it possible to give findViewById a string like "R.id.field_1_text"? > > The reason i want to know this is then, i can use a loop and change > the values for fields like > R.id.field_1_text, R.id.