自定义界面的AlertDialog

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();
        }
    }

你可能感兴趣的:(andriod)