I am setting a tag on a textview using the following code
TextView tv = (TextView) findViewById(R.id.textView1);
tv.setText("New Item");
tv.setTag("1");
How can I read the tag value I have set for this?
I am setting a tag on a textview using the following code
TextView tv = (TextView) findViewById(R.id.textView1);
tv.setText("New Item");
tv.setTag("1");
How can I read the tag value I have set for this?
You can set tag with key also, so that you can set multiple tags with one component
like
tv.setTag(R.id.textView1, "1");
while getting you can do like
tv.getTag(R.id.textView1);