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


Java Configuration.HARDKEYBOARDHIDDEN_YES属性代码示例

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


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

示例1: onConfigurationChanged

@Override
public void onConfigurationChanged(Configuration newConfig) {
	super.onConfigurationChanged(newConfig);

	Log.d(TAG, String.format("onConfigurationChanged; requestedOrientation=%d, newConfig.orientation=%d", getRequestedOrientation(), newConfig.orientation));
	if (bound != null) {
		if (forcedOrientation &&
				(newConfig.orientation != Configuration.ORIENTATION_LANDSCAPE &&
						getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) ||
				(newConfig.orientation != Configuration.ORIENTATION_PORTRAIT &&
						getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT))
			bound.setResizeAllowed(false);
		else
			bound.setResizeAllowed(true);

		bound.hardKeyboardHidden = (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES);

		mKeyboardButton.setVisibility(bound.hardKeyboardHidden ? View.VISIBLE : View.GONE);
	}
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:20,代码来源:ConsoleActivity.java

示例2: readHasHardwareKeyboard

public static boolean readHasHardwareKeyboard(final Configuration conf) {
    // The standard way of finding out whether we have a hardware keyboard. This code is taken
    // from InputMethodService#onEvaluateInputShown, which canonically determines this.
    // In a nutshell, we have a keyboard if the configuration says the type of hardware keyboard
    // is NOKEYS and if it's not hidden (e.g. folded inside the device).
    return conf.keyboard != Configuration.KEYBOARD_NOKEYS
            && conf.hardKeyboardHidden != Configuration.HARDKEYBOARDHIDDEN_YES;
}
 
开发者ID:rkkr,项目名称:simple-keyboard,代码行数:8,代码来源:Settings.java

示例3: onCreate

@Override
public void onCreate() {
	Log.i(TAG, "Starting service");

	prefs = PreferenceManager.getDefaultSharedPreferences(this);
	prefs.registerOnSharedPreferenceChangeListener(this);

	res = getResources();

	pubkeyTimer = new Timer("pubkeyTimer", true);

	hostdb = HostDatabase.get(this);
	colordb = HostDatabase.get(this);
	pubkeydb = PubkeyDatabase.get(this);

	// load all marked pubkeys into memory
	updateSavingKeys();
	List<PubkeyBean> pubkeys = pubkeydb.getAllStartPubkeys();

	for (PubkeyBean pubkey : pubkeys) {
		try {
			KeyPair pair = PubkeyUtils.convertToKeyPair(pubkey, null);
			addKey(pubkey, pair);
		} catch (Exception e) {
			Log.d(TAG, String.format("Problem adding key '%s' to in-memory cache", pubkey.getNickname()), e);
		}
	}

	vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
	wantKeyVibration = prefs.getBoolean(PreferenceConstants.BUMPY_ARROWS, true);

	wantBellVibration = prefs.getBoolean(PreferenceConstants.BELL_VIBRATE, true);
	enableMediaPlayer();

	hardKeyboardHidden = (res.getConfiguration().hardKeyboardHidden ==
		Configuration.HARDKEYBOARDHIDDEN_YES);

	final boolean lockingWifi = prefs.getBoolean(PreferenceConstants.WIFI_LOCK, true);

	connectivityManager = new ConnectivityReceiver(this, lockingWifi);

	ProviderLoader.load(this, this);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:43,代码来源:TerminalManager.java


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