Code example for Dialog

Methods: dismiss, isShowing

0
        return false; 
    } 
 
    @Override 
    public void onActivityDestroy() { 
        if (mDialog == null || !mDialog.isShowing()) {
            return; 
        } 
        mDialog.dismiss();
    } 
 
    protected void onBindDialogView(View view) {
        View dialogMessageView = view.findViewById(R.id.message);
        if (dialogMessageView != null) {
            final CharSequence message = getDialogMessage();
            int newVisibility = View.GONE;
            if (!TextUtils.isEmpty(message)) {
                if (dialogMessageView instanceof TextView) {
                    ((TextView) dialogMessageView).setText(message);
                } 
                newVisibility = View.VISIBLE;