当前位置: 首页>>代码示例>>Java>>正文


Java Activity.isRestricted方法代码示例

本文整理汇总了Java中android.app.Activity.isRestricted方法的典型用法代码示例。如果您正苦于以下问题:Java Activity.isRestricted方法的具体用法?Java Activity.isRestricted怎么用?Java Activity.isRestricted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.app.Activity的用法示例。


在下文中一共展示了Activity.isRestricted方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showDialog

import android.app.Activity; //导入方法依赖的package包/类
public static void showDialog(Activity context, CharSequence title, CharSequence centerText, OnClickListener centerListener) {
    if (mCommonDialog != null && mCommonDialog.isShowing()) {
        mCommonDialog.dismiss();
    }
    mCommonDialog = new LetvCommonDialog(context);
    mCommonDialog.setTitle(title);
    mCommonDialog.setButtonText(centerText);
    if (centerListener != null) {
        mCommonDialog.setCenterOnClickListener(centerListener);
    }
    if (!context.isFinishing() && !context.isRestricted()) {
        try {
            mCommonDialog.show();
        } catch (Exception e) {
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:18,代码来源:DialogUtil.java

示例2: callDialogMsgPositiveButton

import android.app.Activity; //导入方法依赖的package包/类
public static void callDialogMsgPositiveButton(Activity activity, String msgId, OnClickListener yes) {
    TipBean dialogMsgByMsg = TipUtils.getTipBean(msgId);
    if (activity != null && dialogMsgByMsg != null) {
        CharSequence string;
        Builder builder = new Builder(activity);
        if ("".equals(dialogMsgByMsg.title) || dialogMsgByMsg.title == null) {
            string = activity.getString(2131100003);
        } else {
            string = dialogMsgByMsg.title;
        }
        Dialog dialog = builder.setTitle(string).setIcon(2130837921).setMessage(dialogMsgByMsg.message).setPositiveButton(2131100002, yes).create();
        if (!activity.isFinishing() && !activity.isRestricted()) {
            try {
                dialog.show();
            } catch (Exception e) {
            }
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:20,代码来源:UIs.java

示例3: showDialog

import android.app.Activity; //导入方法依赖的package包/类
public static void showDialog(Activity context, CharSequence title, CharSequence content, CharSequence leftText, CharSequence rightText, OnClickListener leftListener, OnClickListener rightListener, int layoutId) {
    if (mCommonDialog != null && mCommonDialog.isShowing()) {
        mCommonDialog.dismiss();
    }
    mCommonDialog = new CommonDialog(context, layoutId);
    mCommonDialog.setTitle(title);
    mCommonDialog.setContent(content.toString());
    mCommonDialog.setButtonText(leftText, rightText);
    if (leftListener != null) {
        mCommonDialog.setLeftOnClickListener(leftListener);
    }
    if (rightListener != null) {
        mCommonDialog.setRightOnClickListener(rightListener);
    }
    if (!context.isFinishing() && !context.isRestricted()) {
        mCommonDialog.show();
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:19,代码来源:DialogUtil.java

示例4: call

import android.app.Activity; //导入方法依赖的package包/类
public static void call(Activity activity, int titleId, int messageId, OnClickListener yes, OnClickListener no) {
    if (activity != null) {
        try {
            Dialog dialog = new Builder(activity).setTitle(titleId).setIcon(R.drawable.dialog_icon).setMessage(messageId).setPositiveButton(R.string.dialog_default_ok, yes).setNegativeButton(R.string.dialog_default_no, no).create();
            if (!activity.isFinishing() && !activity.isRestricted()) {
                dialog.show();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:13,代码来源:DialogUtil.java

示例5: call

import android.app.Activity; //导入方法依赖的package包/类
public static void call(Activity activity, int messageId, int yes, int no, OnClickListener yesListener, OnClickListener noListener) {
    if (activity != null) {
        Dialog dialog = new Builder(activity).setTitle(R.string.dialog_default_title).setIcon(R.drawable.dialog_icon).setMessage(messageId).setPositiveButton(yes, yesListener).setNegativeButton(no, noListener).create();
        if (!activity.isFinishing() && !activity.isRestricted()) {
            try {
                dialog.show();
            } catch (Exception e) {
            }
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:12,代码来源:DialogUtil.java

示例6: showDialog

import android.app.Activity; //导入方法依赖的package包/类
public static void showDialog(Activity context, String strTitle, String strText, int icon) {
    if (context != null && !context.isFinishing() && !context.isRestricted()) {
        Builder tDialog = new Builder(context);
        tDialog.setIcon(icon);
        tDialog.setTitle(strTitle);
        tDialog.setMessage(strText);
        tDialog.setPositiveButton(R.string.Ensure, null);
        try {
            tDialog.show();
        } catch (Exception e) {
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:14,代码来源:BaseHelper.java

示例7: call

import android.app.Activity; //导入方法依赖的package包/类
public static void call(Activity activity, int messageId, int yes, int no, OnClickListener yesListener, OnClickListener noListener, View view) {
    if (activity != null) {
        Dialog dialog = new Builder(activity).setTitle(2131100003).setIcon(2130837921).setMessage(messageId).setView(view).setPositiveButton(yes, yesListener).setNegativeButton(no, noListener).create();
        if (!activity.isFinishing() && !activity.isRestricted()) {
            try {
                dialog.show();
            } catch (Exception e) {
            }
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:12,代码来源:UIs.java


注:本文中的android.app.Activity.isRestricted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。