Home > Net >  Adapter Android Studio Button
Adapter Android Studio Button

Time:02-10

I have an adapter with a button inside and I don't really know ho to do something when I presse the button. It's an order app and in the the basket I have a delete button to delete a dish. Do you have a solution ?

CodePudding user response:

Maybe you can find the solution here: https://stackoverflow.com/a/37846430/

Instead of implementing the View.OnClickListener in the ExampleClickViewHolder, you should be fine with simply setting an onClickListener to your button and call the mOnEntryClickListener.onEntryClick in it.

For a more reliable answer, please add some details on your current code.

  •  Tags:  
  • Related