android - Dynamic Variable Names - A Variation -
this expansion question asked dynamic variable names resolved , working well.
this time have series of textview elements ids of e1z1, e1z2, e1z3, e2z1, e2z2, e2z3 etc (54 in total) , hope can see naming pattern here.
what need able do, , assume array of sort, set each textview id specific value (eg e1z1.settext("0");
any suggestions best way achieve appreciated.
i notice in other question getting of textview's array.
once in array, can use loop , go through array setting want each of textview's.
for (int = 0; < totalnumberofviews; i++) { tv[i].settext("0"); tv[i].setid(i + 99); ...etc. }
Comments
Post a Comment