当前位置: 首页>>代码示例>>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;未经允许,请勿转载。