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


Java Settings.ACTION_DISPLAY_SETTINGS屬性代碼示例

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


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

示例1: createSettingHandler

/**
* Factory method
* @param setting	a setting for which a handler will be created
* @return			a setting handler
*/
  public static SettingHandler createSettingHandler(Setting setting) {
  	
  	switch (setting.id) {
  	
   	// create handlers
  		case WIFI: return new WiFiSettingHandler(setting);
   	case GPS: return new GpsSettingHandler(setting);
   	case RINGER: return new RingerSettingHandler(setting);
   	case BRIGHTNESS: {
   		if (SDK_VERSION == BrightnessSettingHandlerX10.SDK_VERSION && Build.DEVICE.equals(BrightnessSettingHandlerX10.DEVICE)) {
   			return new BrightnessSettingHandlerX10(setting);
   		} else {
   			return new BrightnessSettingHandler(setting);
   		}
   	} 
   	case AIRPLANE_MODE: return new AirplaneModeSettingHandler(setting);
   	case MOBILE_DATA_APN: return new MobileDataSettingHandler(setting);
   	case BLUETOOTH: return new BluetoothSettingHandler(setting);
   	case SCREEN_TIMEOUT: return new ScreenTimeoutSettingHandler(setting);
   	case VOLUME: return new VolumeControlSettingHandler(setting);
   	case AUTO_SYNC: return new AutoSyncSettingHandler(setting);
   	case AUTO_ROTATE: return new SystemPropertySettingHandler(setting, Settings.System.ACCELEROMETER_ROTATION, Settings.ACTION_DISPLAY_SETTINGS);
   	case LOCK_PATTERN: return SDK_VERSION >= 8 ? new UnlockPatternSettingHandler22(setting) : new UnlockPatternSettingHandler(setting);
   	case MASTER_VOLUME: return new MasterVolumeSettingHandler(setting);
   	case WIFI_HOTSPOT: return new WifiHotspotSettingHandler(setting);
   	case MOBILE_DATA: return new MobileDataSettingHandler2(setting);
   	case FOUR_G : return new FourGEvoSettingHandler(setting);
   	
   	// null-handlers
   	case Setting.GROUP_VISIBLE:
   	case Setting.GROUP_HIDDEN:
  		default: 
  			return null;
  	}
  }
 
開發者ID:sdrausty,項目名稱:buildAPKsApps,代碼行數:40,代碼來源:SettingsFactory.java

示例2: onLongClick

@Override
public boolean onLongClick(View v) {
    try {
        Intent intent = new Intent(Settings.ACTION_DISPLAY_SETTINGS);
        Object host = XposedHelpers.getObjectField(mQsPanel, "mHost");
        XposedHelpers.callMethod(host, "startActivityDismissingKeyguard", intent);
        return true;
    } catch (Throwable t) {
        XposedBridge.log(t);
        return false;
    }
}
 
開發者ID:WrBug,項目名稱:GravityBox,代碼行數:12,代碼來源:QsPanel.java


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