I have an onClickListener on a buttonView. The buttonView needs to detect which radioButton is selected in a radio group. But buttonView’s setTag is already occupied by a JSON object that the onClickListener needs to access (via v.getTag = new JSONOBject). So, can buttonView have two (2) tags? I see there are two methods, setTag(Object ojb); and setTag(key, object);
Could I use that to my advantage?
Which it can do, without a tag, by calling a method on the
RadioGroup.Create one tag object that holds onto your two other objects.
The two-parameter
setTag()is really there for the OS and for libraries. App developers are discouraged from using it. Moreover, as noted above, you do not need it.