1 AlertDialog mAlertDialog;
2 View contentView = View.inflate(mContext, R.layout.alertDialogView, null);
3 this.mAlertDialog = new AlertDialog.Builder(mContext)
.setView(contentView)
.create();
/**
* 显示
*/
public void show(){
if(this.mAlertDialog != null){
this.mAlertDialog.show();
}
}
/**
* 隐藏
*/
public void hide(){
if(this.mAlertDialog != null){
this.mAlertDialog.hide();
}
}
自定义界面的AlertDialog
最新推荐文章于 2025-05-17 15:11:12 发布