How to determine which row button the list view button is clicked on
Hello I have listview
one in which I am using a custom adapter and string layout. I like the imageview
top and the bottom has one checkbox on the left and a button on the right end.
Now I want to apply a test listener to checkbox
and push the listener to button
. This is what I do
mybutton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
}
});
satView.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
if (isChecked){
// perform logic
}
}
});
Question
Thus, the list will be checkbox
, and buttton
in each row. How do I know if the user clicks on the second or third line, etc. checkbox
or button
.
Thanks in advance.
source to share