Assuming i got 3 data:i=01,j=02,k=03 and i want to set these 3 data indiviually into 3 textViews that defined with ids:@+id/tv01,@+id/tv02,@+id/tv03. The following is what i have tried:
if (textview.getid().contain(i))
textView.settext(i)
But when i use textview.getid(), why the result comes out is not the the one i defined for textview in the xml? Any ideas?
Thanks for the help!
if you want to do it same way you are doing.
You can manually set the ids of TextView by using setId().
For eg.
and for getting use getId() you will get what you have set.