当前位置: 首页>>代码示例>>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;未经允许,请勿转载。