本文整理汇总了Java中android.content.res.Configuration.KEYBOARD_QWERTY属性的典型用法代码示例。如果您正苦于以下问题:Java Configuration.KEYBOARD_QWERTY属性的具体用法?Java Configuration.KEYBOARD_QWERTY怎么用?Java Configuration.KEYBOARD_QWERTY使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.content.res.Configuration
的用法示例。
在下文中一共展示了Configuration.KEYBOARD_QWERTY属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TerminalKeyListener
public TerminalKeyListener(TerminalManager manager,
TerminalBridge bridge,
VDUBuffer buffer,
String encoding) {
this.manager = manager;
this.bridge = bridge;
this.buffer = buffer;
this.encoding = encoding;
selectionArea = new SelectionArea();
prefs = PreferenceManager.getDefaultSharedPreferences(manager);
prefs.registerOnSharedPreferenceChangeListener(this);
deviceHasHardKeyboard = (manager.res.getConfiguration().keyboard
== Configuration.KEYBOARD_QWERTY);
updatePrefs();
}
示例2: onConfigurationChanged
@Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
if (mUrlHasFocus && mUrlFocusedWithoutAnimations
&& newConfig.keyboard != Configuration.KEYBOARD_QWERTY) {
// If we lose the hardware keyboard and the focus animations were not run, then the
// user has not typed any text, so we will just clear the focus instead.
setUrlBarFocus(false);
}
}
示例3: shouldShowCusrsorInLocationBar
private boolean shouldShowCusrsorInLocationBar() {
Tab tab = mToolbarModel.getTab();
if (tab == null) return false;
NativePage nativePage = tab.getNativePage();
if (!(nativePage instanceof NewTabPage) && !(nativePage instanceof IncognitoNewTabPage)) {
return false;
}
Context context = mToolbar.getContext();
return DeviceFormFactor.isTablet(context)
&& context.getResources().getConfiguration().keyboard
== Configuration.KEYBOARD_QWERTY;
}