I have 16 buttons and I tag them to pair some terms set to buttons and imported from sqlite database. So, I tag them like this:
// labelForButton and tagForButto
try :
button.setTag(R.id.resource_id1,obj1); button.setTag(R.id.resource_id2,obj2); button.setTag(R.id.resource_id3,obj3);
and to get the tags, use
v.getTag(R.id.resource_id1); v.getTag(R.id.resource_id2); v.getTag(R.id.resource_id3);
but, this will return only objects. you need to typecast it.