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


Java Settings.ACTION_SETTINGS屬性代碼示例

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


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

示例1: onOptionsItemSelected

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();
    if (id == R.id.action_widget) {
        selectWidget();
        return true;
    }else if(id == R.id.action_settings){
        SettingsActivity.apps = WeakApp.from(apps);
        startActivityForResult(new Intent(this, SettingsActivity.class), 101);
        return true;
    }else if(id ==R.id.action_shortcut){
        startActivityForResult(new Intent(Intent.ACTION_CREATE_SHORTCUT),119);
        return true;
    }else if(id == R.id.action_system_settings){
        Intent intent = new Intent(Settings.ACTION_SETTINGS);
        if (intent.resolveActivity(getPackageManager()) != null) {
            startActivity(intent);
        }else Toast.makeText(this, "Settings could not be opened", Toast.LENGTH_SHORT).show();
        return true;
    }

    if (drawerToggle.onOptionsItemSelected(item)) {
        return true;
    }
    return super.onOptionsItemSelected(item);
}
 
開發者ID:jathak,項目名稱:sflauncher,代碼行數:26,代碼來源:MainActivity.java

示例2: showNonetLayout

public void showNonetLayout(View.OnClickListener refreshListener) {
        final View.OnClickListener settingListener = new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(Settings.ACTION_SETTINGS);
//                // 判斷手機係統的版本 即API大於10 就是3.0或以上版本及魅族手機
//                if (Build.VERSION.SDK_INT > 10 && !Build.MANUFACTURER.equals("Meizu")) {
//                    intent = new Intent(Settings.ACTION_WIRELESS_SETTINGS);
//                } else if (Build.VERSION.SDK_INT > 17 && Build.MANUFACTURER.equals("Meizu")) {
//                    //魅族更高版本調轉的方式與其它手機型號一致  可能之前的版本有些一樣  所以另加條件(tsp)
//                    intent = new Intent(Settings.ACTION_WIRELESS_SETTINGS);
//                } else {
//                    intent = new Intent(Settings.ACTION_SETTINGS);
////                    intent = new Intent(Settings.ACTION_WIFI_SETTINGS);
////                    intent = new Intent(Settings.ACTION_WIRELESS_SETTINGS);
////                    ComponentName component = new ComponentName("com.android.settings", "com.android.settings.WirelessSettings");
////                    intent.setComponent(component);
////                    intent.setAction("android.intent.action.VIEW");
//                }
                mActivity.startActivity(intent);
            }
        };
        showNonetLayout(settingListener, refreshListener);
    }
 
開發者ID:angcyo,項目名稱:RLibrary,代碼行數:24,代碼來源:UIBaseView.java

示例3: openDefaultSettings

public static void openDefaultSettings(Context context) {
    Intent settingsIntent = new Intent(Settings.ACTION_SETTINGS);
    settingsIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(settingsIntent);
}
 
開發者ID:Existentio,項目名稱:OddLauncher,代碼行數:5,代碼來源:Utils.java

示例4: startWifiSetting

/**
 * 打開網絡設置界麵
 */
public static void startWifiSetting() {
    //也可以直接用ACTION_WIRELESS_SETTINGS打開到wifi界麵
    Intent intent = new Intent(Settings.ACTION_SETTINGS);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    UtilManager.getContext().startActivity(intent);
}
 
開發者ID:sundevin,項目名稱:utilsLibrary,代碼行數:9,代碼來源:SystemIntent.java

示例5: SystemConfig

/**
 * 係統設置界麵
 * @param activity
 */
public static void SystemConfig(Activity activity) {
    Intent intent = new Intent(Settings.ACTION_SETTINGS);
    activity.startActivity(intent);
}
 
開發者ID:xmlxin,項目名稱:ReplyMessage,代碼行數:8,代碼來源:JumpPermissionManagement.java


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