AlertDialog 中的 RecyclerView,如何在单击 RecyclerViewAdapter 按钮时关闭对话框

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

Image of RecyclerView within AlertDialog

我的 AlertDialog 中有一个 RecyclerView,如图所示。 我的问题是,如果我在该 RecyclerView 中单击一个按钮(检查按钮,此按钮在 RecyclerViewAdapter 中实例化),我如何关闭另一个视图中的对话框?

将对话框实例传递给回收器视图适配器,然后在单击按钮时关闭回收器视图适配器中的对话框。