android.provider.Settings#ACTION_SETTINGS源码实例Demo

下面列出了android.provider.Settings#ACTION_SETTINGS 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: android_9.0.0_r45   文件: LegacyGlobalActions.java
private Action getSettingsAction() {
    return new SinglePressAction(com.android.internal.R.drawable.ic_settings,
            R.string.global_action_settings) {

        @Override
        public void onPress() {
            Intent intent = new Intent(Settings.ACTION_SETTINGS);
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
            mContext.startActivity(intent);
        }

        @Override
        public boolean showDuringKeyguard() {
            return true;
        }

        @Override
        public boolean showBeforeProvisioning() {
            return true;
        }
    };
}
 
源代码2 项目: TikTok   文件: NetworkUtil.java
/**
     * 打开系统设置界面
     */
    public static void openSetting(Activity activity) {
//        Intent intent = new Intent("/");
//        ComponentName cm = new ComponentName("com.android.settings",
//                "com.android.settings.WirelessSettings");
//        intent.setComponent(cm);
//        intent.setAction("android.intent.action.VIEW");
//        activity.startActivityForResult(intent, 0);

        //打开移动网络设置界面
//        Intent intent =  new Intent(Settings.ACTION_DATA_ROAMING_SETTINGS);
//        activity.startActivity(intent);

        Intent intent = new Intent(Settings.ACTION_SETTINGS);
        activity.startActivity(intent);

    }
 
源代码3 项目: DevUtils   文件: IntentUtils.java
/**
 * 获取跳转到系统设置的意图
 * @param isNewTask 是否开启新的任务栈
 * @return 跳转到系统设置的意图
 */
public static Intent getSystemSettingIntent(final boolean isNewTask) {
    try {
        Intent intent = new Intent(Settings.ACTION_SETTINGS);
        return getIntent(intent, isNewTask);
    } catch (Exception e) {
        LogPrintUtils.eTag(TAG, e, "getSystemSettingIntent");
    }
    return null;
}
 
@Override
protected void onResume() {
    super.onResume();
    disposable = new CompositeDisposable();
    if (nfcManager.verifyNFC())
        init();
    else {
        Intent setnfc = new Intent(Settings.ACTION_SETTINGS);
        startActivity(setnfc);
    }


}
 
源代码5 项目: HayaiLauncher   文件: SearchActivity.java
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle item selection
    switch (item.getItemId()) {
        case R.id.action_settings:
            final Intent intentSettings = new Intent(this, SettingsActivity.class);
            startActivity(intentSettings);
            return true;
        case R.id.action_refresh_app_list:
            recreate();
            return true;
        case R.id.action_system_settings:
            final Intent intentSystemSettings = new Intent(Settings.ACTION_SETTINGS);
            intentSystemSettings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(intentSystemSettings);
            return true;
        case R.id.action_manage_apps:
            final Intent intentManageApps = new Intent(Settings.ACTION_APPLICATION_SETTINGS);
            intentManageApps.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(intentManageApps);
            return true;
        case R.id.action_set_wallpaper:
            final Intent intentWallpaperPicker = new Intent(Intent.ACTION_SET_WALLPAPER);
            startActivity(intentWallpaperPicker);
            return true;
        case R.id.action_about:
            final Intent intentAbout = new Intent(this, AboutActivity.class);
            startActivity(intentAbout);
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}
 
源代码6 项目: BaseProject   文件: IntentUtil.java
/** 跳转到设置界面 */
public static void setting(@NonNull Context context) {
    Intent intent = new Intent(Settings.ACTION_SETTINGS);
    context.startActivity(intent);
}
 
源代码7 项目: BaseProject   文件: BaseUiHelper.java
/**
 * 跳转到系统设置界面
 * @param context
 */
public static void jumpToSystemSetting(Context context) {
    Intent toSettingActionIntent = new Intent(Settings.ACTION_SETTINGS);
    jumpToActivity(context,toSettingActionIntent,0,false);
}
 
源代码8 项目: mirror   文件: Util.java
/**
 * Launches the system's default settings activity.
 */
public void launchSettings() {
  Intent settingsIntent = new Intent(Settings.ACTION_SETTINGS);
  context.startActivity(settingsIntent);
}