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.field_2_text, R.id.field_3_text .... rather
> than setting all of them sequentially.

Why not put them in an array?

private int[] ALL_YOUR_TEXT={R.id.field_1_text, R.id.field_2_text, ...};

Then you can iterate over them as you wish.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.1 Published!

--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to