I used the tag to represent using view.setTag(t1);, and then returned the view using parent.findViewWithTag(t1);that returned correctly.
Now I need to set 2 different tags for my views, and I do it with
view.setTag(R.id.tag1, t1);
view.setTag(R.id.tag2, t2);
If tag1 and tag2 are identifiers declared in res / values /ids.xml
Then I try to get the view with the t1 tag, but parent.findViewWithTag(t1);returns null. I searched and there is no method findViewWithTagor the like that will also accept the tag key.
Is there any way to achieve this? If you can’t tell me where this is indicated in the Android documentation,
In this particular case, I could use idinstead of one of the tags, but for situations where this is not possible, I would like to know if this can be done using tags.
source
share