當前位置: 首頁>>代碼示例>>Java>>正文


Java Dialog.isShowing方法代碼示例

本文整理匯總了Java中android.app.Dialog.isShowing方法的典型用法代碼示例。如果您正苦於以下問題:Java Dialog.isShowing方法的具體用法?Java Dialog.isShowing怎麽用?Java Dialog.isShowing使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.app.Dialog的用法示例。


在下文中一共展示了Dialog.isShowing方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: showDialog

import android.app.Dialog; //導入方法依賴的package包/類
private void showDialog(Dialog dlg) {
    if (dlg != null) {
        try {
            if (dlg.isShowing()) {
                dlg.cancel();
            } else {
                dlg.show();
            }
        } catch (Exception e) {
        }
    }
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:13,代碼來源:LetvAlipayManager.java

示例2: dismiss

import android.app.Dialog; //導入方法依賴的package包/類
/**
 * 關閉彈出框
 */
public static void dismiss(DialogInterface... dialogs) {
    if (dialogs != null && dialogs.length > 0) {
        for (DialogInterface dialog : dialogs) {
            if (dialog instanceof Dialog) {
                Dialog dialog1 = (Dialog) dialog;
                if (dialog1.isShowing()) {
                    dialog1.dismiss();
                }
            } else if (dialog instanceof AppCompatDialog) {
                AppCompatDialog dialog2 = (AppCompatDialog) dialog;
                if (dialog2.isShowing()) {
                    dialog2.dismiss();
                }
            }
        }

    }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:22,代碼來源:DialogUIUtils.java

示例3: dismiss

import android.app.Dialog; //導入方法依賴的package包/類
/**
 * 關閉彈出框
 */
public static void dismiss(DialogInterface... dialogs) {
    if (dialogs != null && dialogs.length > 0) {
        for (DialogInterface dialog : dialogs) {
            if (dialog instanceof Dialog) {
                Dialog dialog1 = (Dialog) dialog;
                if (dialog1.isShowing()) {
                    dialog1.dismiss();
                }
            } else if (dialog instanceof AppCompatDialog) {
                AppCompatDialog dialog2 = (AppCompatDialog) dialog;
                if (dialog2.isShowing()) {
                    dialog2.dismiss();
                }
            }
        }

    }


}
 
開發者ID:devzwy,項目名稱:KUtils,代碼行數:24,代碼來源:DialogUIUtils.java

示例4: showLoading

import android.app.Dialog; //導入方法依賴的package包/類
public LoadingView showLoading(CharSequence msg, boolean cancleabl) {

        mDialog = new Dialog(mContext);// TODO: 2017/8/28 內存泄露時這裏也修改為弱引用
        mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);

        rootView = View.inflate(mContext, R.layout.dialogui_loading_horizontal, null);
        mLinearLayout = (LinearLayout) rootView.findViewById(R.id.dialogui_ll_bg);
        mProgressBar = (ProgressBar) rootView.findViewById(R.id.pb_bg);
        mTextView = (TextView) rootView.findViewById(R.id.dialogui_tv_msg);
        mTextView.setText(msg);
        mLinearLayout.setBackgroundResource(R.drawable.dialogui_shape_wihte_round_corner);
        mProgressBar.setIndeterminateDrawable(mContext.getResources().getDrawable(R.drawable.dialogui_shape_progress));
        mTextView.setTextColor(mContext.getResources().getColor(R.color.text_black));
        mDialog.setContentView(rootView);

        if (mDialog != null) {
            if (mDialog.isShowing()) {
                mDialog.dismiss();
            }
            mDialog.setCancelable(cancleabl);
            mDialog.setOnCancelListener(this);
            mDialog.show();
        }
        return this;
    }
 
開發者ID:devzwy,項目名稱:NeiHanDuanZiTV,代碼行數:26,代碼來源:LoadingView.java

示例5: showDialog

import android.app.Dialog; //導入方法依賴的package包/類
private void showDialog(Dialog dlg) {
    if (dlg != null) {
        if (dlg.isShowing()) {
            dlg.cancel();
        } else {
            dlg.show();
        }
    }
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:10,代碼來源:RequestLedianPayTask.java

示例6: onSaveInstanceState

import android.app.Dialog; //導入方法依賴的package包/類
@Override protected Parcelable onSaveInstanceState() {
    final Parcelable superState = super.onSaveInstanceState();
    Dialog dialog = getDialog();
    if (dialog == null || !dialog.isShowing()) {
        return superState;
    }

    final SavedState myState = new SavedState(superState);
    myState.isDialogShowing = true;
    myState.dialogBundle = dialog.onSaveInstanceState();
    return myState;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:13,代碼來源:MaterialDialogPreference.java

示例7: dismissDialog

import android.app.Dialog; //導入方法依賴的package包/類
private void dismissDialog(Dialog dialog) {
    if (dialog == null)
        return;

    if (dialog.isShowing()) {
        dialog.dismiss();
    }
}
 
開發者ID:rumaan,項目名稱:file.io-app,代碼行數:9,代碼來源:MainActivity.java

示例8: onSaveInstanceState

import android.app.Dialog; //導入方法依賴的package包/類
@Override
protected Parcelable onSaveInstanceState() {
    final Parcelable superState = super.onSaveInstanceState();
    final Dialog dialog = getDialog();
    if (dialog == null || !dialog.isShowing()) {
        return superState;
    }

    final SavedState myState = new SavedState(superState);
    myState.mSubtype = mSubtype;
    return myState;
}
 
開發者ID:rkkr,項目名稱:simple-keyboard,代碼行數:13,代碼來源:CustomInputStylePreference.java

示例9: dismiss

import android.app.Dialog; //導入方法依賴的package包/類
/**
 * Tries to dismiss the given {@link Dialog}.
 *
 * @param dialog Which dialog to dismiss
 * @return {@code True} if the given dialog is not {@code null}, it is currently showing and dismiss was invoked; {@code false}
 * otherwise
 */
public static boolean dismiss(@Nullable final Dialog dialog) {
    if (dialog != null && dialog.isShowing()) {
        dialog.dismiss();
        return true;
    } else {
        return false;
    }
}
 
開發者ID:milosmns,項目名稱:silly-android,代碼行數:16,代碼來源:SillyAndroid.java

示例10: releaseDialogList

import android.app.Dialog; //導入方法依賴的package包/類
/**
 *
 */
private void releaseDialogList() {
    if(mAppDialogCache == null) {
        return;
    }

    for(Dialog dialog : mAppDialogCache) {
        if(dialog == null || !dialog.isShowing()) {
            continue;
        }
        dialog.dismiss();
    }
    mAppDialogCache.clear();
    mAppDialogCache = null;
}
 
開發者ID:Louis19910615,項目名稱:youkes_browser,代碼行數:18,代碼來源:CCPActivityBase.java

示例11: safeShowDialog

import android.app.Dialog; //導入方法依賴的package包/類
/**
 * 顯示Dialog
 */
public static void safeShowDialog(Dialog dialog) {
    try {
        if (dialog != null && !dialog.isShowing()) {
            dialog.show();
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
開發者ID:zhonglikui,項目名稱:cardinalsSample,代碼行數:13,代碼來源:DialogUtil.java

示例12: closeDialog

import android.app.Dialog; //導入方法依賴的package包/類
/**
 * 關閉dialog
 *
 * @param mDialogUtils
 */
public static void closeDialog(Dialog mDialogUtils) {
    if (mDialogUtils != null && mDialogUtils.isShowing()) {
        mDialogUtils.dismiss();
    }
}
 
開發者ID:Loofer,項目名稱:Watermark,代碼行數:11,代碼來源:DefaultDialogUtils.java

示例13: toDismissDialog

import android.app.Dialog; //導入方法依賴的package包/類
protected void toDismissDialog(Dialog dialog) {
    if (dialog != null && dialog.isShowing()) {
        dialog.dismiss();
    }
}
 
開發者ID:Justson,項目名稱:AgentWeb,代碼行數:6,代碼來源:AgentWebUIController.java

示例14: toShowDialog

import android.app.Dialog; //導入方法依賴的package包/類
protected void toShowDialog(Dialog dialog) {
    if (dialog != null && !dialog.isShowing()) {
        dialog.show();
    }
}
 
開發者ID:Justson,項目名稱:AgentWeb,代碼行數:6,代碼來源:AgentWebUIController.java

示例15: closeDialog

import android.app.Dialog; //導入方法依賴的package包/類
/**
 * 關閉dialog
 *
 * http://blog.csdn.net/qq_21376985
 *
 * @param mDialogUtils
 */
public static void closeDialog(Dialog mDialogUtils) {
    if (mDialogUtils != null && mDialogUtils.isShowing()) {
        mDialogUtils.dismiss();
    }
}
 
開發者ID:MedicationReminder,項目名稱:MedicationReminder,代碼行數:13,代碼來源:WeiboDialogUtils.java


注:本文中的android.app.Dialog.isShowing方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。