How can I set a dynamic string as an Id of an Edittext Field in android -


i having multiple strings, coming dynamically, want set these strings id of edittext fields in form. how can that, can please me?

for ex: if having id "title", want set title id of edittext field, when want access value of field, can access findviewbyid(title).

please me here...

thank in advance.

no, can't set id char, string or else except int...because, id maintained r.java file contains int.

you can use settag() instead of setid().

use settag() below...

edtext.settag("title"); 

you can later check using gettag() edtext.gettag().

you can use findviewwithtag in order find view specific tag.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -