本文整理了Java中com.coder.zzq.smartshow.core.Utils.isUpdateActivityUIPermitted()
方法的一些代码示例,展示了Utils.isUpdateActivityUIPermitted()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.isUpdateActivityUIPermitted()
方法的具体详情如下:
包路径:com.coder.zzq.smartshow.core.Utils
类名称:Utils
方法名:isUpdateActivityUIPermitted
暂无
代码示例来源:origin: the-pig-of-jungle/smart-show
public boolean dismiss(Activity activity) {
if (!Utils.isUpdateActivityUIPermitted(activity) ||
(mNestedDialog == null || !mNestedDialog.isShowing())) {
return false;
}
try {
mNestedDialog.dismiss();
return true;
} catch (IllegalStateException e) {
EasyLogger.d("IllegalStateException has happened when show dialog:\n" + mNestedDialog);
return false;
}
}
代码示例来源:origin: the-pig-of-jungle/SmartShow
public boolean dismiss(Activity activity) {
if (!Utils.isUpdateActivityUIPermitted(activity) ||
(mNestedDialog == null || !mNestedDialog.isShowing())) {
return false;
}
try {
mNestedDialog.dismiss();
return true;
} catch (IllegalStateException e) {
EasyLogger.d("IllegalStateException has happened when show dialog:\n" + mNestedDialog);
return false;
}
}
代码示例来源:origin: the-pig-of-jungle/SmartShow
public boolean show(Activity activity) {
if (!Utils.isUpdateActivityUIPermitted(activity) ||
(mNestedDialog == null && mDialogCreator == null)) {
return false;
}
if (mNestedDialog == null || !mReuseDialog) {
mNestedDialog = mDialogCreator.createDialog(activity);
EasyLogger.d("create a new dialog:\n " + mNestedDialog);
} else {
EasyLogger.d("reuse dialog:\n " + mNestedDialog);
}
if (mNestedDialog != null) {
try {
mNestedDialog.show();
return true;
} catch (WindowManager.BadTokenException e) {
EasyLogger.e("BadToken has happened when show dialog: \n" + mNestedDialog.getClass().getSimpleName());
return false;
}
}
return false;
}
代码示例来源:origin: the-pig-of-jungle/smart-show
public boolean show(Activity activity) {
if (!Utils.isUpdateActivityUIPermitted(activity) ||
(mNestedDialog == null && mDialogCreator == null)) {
return false;
}
if (mNestedDialog == null || !mReuseDialog) {
mNestedDialog = mDialogCreator.createDialog(activity);
EasyLogger.d("create a new dialog:\n " + mNestedDialog);
} else {
EasyLogger.d("reuse dialog:\n " + mNestedDialog);
}
if (mNestedDialog != null) {
try {
mNestedDialog.show();
return true;
} catch (WindowManager.BadTokenException e) {
EasyLogger.e("BadToken has happened when show dialog: \n" + mNestedDialog.getClass().getSimpleName());
return false;
}
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!