I have an activity with a ListView that loads data from a web service. I have a button in each list item which is loaded through custom adapter class. I am handling the button events in the adapter class. Now what I need is to finish the activity with ListView from the adapter class in the button click event.
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
((Activity)context).finish();
}
});
use this code on button click event
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With