android - Reference control using string instead ID -


typical way reference android control this:

textview tv = (textview)findviewbyid(r.id.tv); 

where r.id.tv integer referencing xml control.

the thing make reference using string "r.id.tv". possible?

let's have multiple controls:

tv1, tv2, tv3, tv4, tv5, 

how put sort of loop , interate through controls. thinking use loop counter reference different controls. how's done? thanks.

have @ question:


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -