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
Define the key id in strings.xml
and then get it through the id
example:
In String.xml declare the following code
now set the tag like following
share.setTag(R.id.date,it.adjournDate);
share.setTag(R.id.name,it.partyName);
Share is my button name
Now finally get the tag in button where you want these values listener like this:
v.getTag(R.id.name)
v.getTag(R.id.date)