My TextView class is
static class ViewHolder {
protected TextView tv0;
protected TextView tv1;
protected TextView tv2;
protected TextView tv3;
protected TextView tv4;
protected TextView tv5;
protected TextView tv6;
protected TextView tv7;
}
linearview.setTag(viewHolder);
linearView.setId(xyz);
// viewHolder.tv5 id will be xyz+5
Now, I can get the whole class with view.getTag. what i want is, suppose i have a word “TEST”
my random function selects 2 so i want tv2 = T, tv3 = E and so on. I can use str.getCharAt to get the char but how to get textViews from random word.
Best Regards
If I’m understanding this right….
Within the class you can simply write:
And then write a getter:
Alternatively, instead of making them protected, you make them public. (only if changing their values directly without having to change anything else is ok)