retrieving listrow data Android
I have a list of Strings and every row has a button next to it. If the user clicks the button i want to retrieve the data for that row from the onClickListener. This sounds like impossible because there's no way I can retrieve data from a list without onItemClick. Is there a w开发者_Python百科ay to accomplish this with a button click instead?
Well, you know the position in the list from the onclickevent, right? So you could call the getItem with that position?
That's the thing, i don't have a position in the clickListener:
addButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
}
});
精彩评论