This is my function declaration,
fun MyDialog(ctx: Context, msg: String, yestext: String = "", OnYes: DialogInterface.OnClickListener? = null): AlertDialog
fun MyClickListener(){}
How do i pass MyClickListener into MyDialog?
MyDialog(context, "Delete data", "Yes", MyClickListener) showed type mismatch.
In DialogInterface.class
public interface OnClickListener {
void onClick(DialogInterface var1, int var2);
}