I need to create one textview array, i'd like to show or hide one image depending position. I'll try to explain it: I've one layout similar this:
1 2 3 4 5
And depending random value show or hide an image in textview 1 or 2, etc...
I can use:
if (a == 4) { t4.setBackgroundResource(R.drawable.ficha); t1.setBackgroundDrawable(null); t2.setBackgroundDrawable(null); t3.setBackgroundDrawable(null); t5.setBackgroundDrawable(null); } else if (a==5) ... .. But i'd like to know, if it's possible to pass the number t(1) using parameters or something similar.
Thanks in advance and sorry about my english.