Andrew
Andrew

Reputation: 81

RecyclerView within AlertDialog, how to dismiss dialog onClick of RecyclerViewAdapter button

Image of RecyclerView within AlertDialog

I have a RecyclerView within my AlertDialog as seen on the image. My problem is if I click a button (The Check Button, this button is instantiated in the RecyclerViewAdapter) within that RecyclerView, how do I dismiss the dialog which is in another View?

Upvotes: 2

Views: 806

Answers (1)

Snehal
Snehal

Reputation: 553

Pass the instance of dialog to recycler view adapter and then dismiss the dialog in recycler view adapter on click of button.

Upvotes: 5

Related Questions