在我的Recylerview Adapter中,每个项目中都有多个按钮,我想要的是在单击这些按钮时显示DialogFragment as confirmation,并在单击positiveButton时执行不同的方法onBindViewHolder(final PageOnlineAdapter.TheViewHolder holder, final int position) {
holder.btn_start.setOnClickListener=>execute method
即使我用对话框构建了一个超级基本活动,它也不起作用。我要在代码中放些什么才能让它正常工作?textIWantToSee = "If this is the text I want to pass form this activity to the Fragment";
public void onClick(View v) {
});}public class Dialog extends <
class CustomDialogFragment: DialogFragment(){
val oktextview = dialogview.findViewById<TextView>(R.id.YES) oktextview.setOnClickListener: throw IllegalStateException("