title: Add custom data / attributes to button in Android
body: <p>What I am doing right now is to pull some data from an API and for each item in the response, I inflate the layout and add another item to the layout.</p>
  
  <p>What I want is to have an "add to favorites" button, which will add the current item in an SQLite database. I've already created the DAO stuff and the DB handling, but there's one thing that bugs me.</p>
  
  <p>When I click the button, I can't tell which item ID's button has been clicked. I'm normally a web developer and on the web, a button can have <code>data-xxx="yyy"</code> attributes, where <code>xxx</code> and <code>yyy</code> are what ever the developer wants.</p>
  
  <p>Is this possible in Android? I have another solution, but it's more like a "hack": create a hidden TextView that holds my item's ID, and get the <code>onClick</code> event to check that TextView (the one that is a sibling to the button). Any other ideas?</p>