我不能让这个按钮的工作:不兼容的类型:android.content.DialogInterface.OnClickListener不能转换到android.view.View.OnClickListener
public void setConfirmListenner(OnClickListener listener) {
((Button) this.contentView.findViewById(R.id.confirmButton)).setOnClickListener(listener);
}
Error:(296, 85) error: incompatible types: android.content.DialogInterface.OnClickListener cannot be converted to android.view.View.OnClickListener
我想这是一个你正在使用的库,因为'setConfirmListener'。无论如何,这是不够的,请显示您的代码并发布完整的堆栈跟踪... – Opiatefuchs
该方法包含一个'View.OnClickListener',并且您传递一个'DialogInterface.OnClickListener'。我认为你必须删除导入和导入,而不是'View.OnClickListener' – Opiatefuchs