Before I added a button to the layout XML for my rows, the row ID was returned in the callback onListItemClick() upon a list item being clicked. Now that I added a button to
You can tag your Buttons with the appropriate id or position in your adapter's getView
method. For example:
myButton.setTag(id);
Then in your onClick handler, retrieve the tag from the view that was clicked. For example:
public void newCallBackFunctionName(View v) {
long id = (Long) v.getTag();
// ...
}