这是我的函数声明,
fun MyDialog(ctx: Context, msg: String, yestext: String = "", OnYes: DialogInterface.OnClickListener? = null): AlertDialog
fun MyClickListener(){}
如何将MyClickListener传递给MyDialog?
MyDialog(上下文,“删除数据”,“是”,MyClickListener)显示类型不匹配。
在DialogInterface.class中
public interface OnClickListener {
void onClick(DialogInterface var1, int var2);
}