I have 12 TextView fields named textView1 - textView12.
Each TextView will have 2 attributes set: SetText &
SetBackgroundDrawable which are read from an array (textValue[] and
textBackground[]).
What I would like to do is write a for (or similar loop) statement to
draw them in a loop rather than write each one individually.
Something like
for(int Z=1; Z<=12; Z++){
textViewZ.setText(textValue[Z]);
textViewZ.setBackgroundColor(textBackground[Z]);
}
Unfortunately is looks for the variable textViewZ instead of textView1.
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android
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