每次我的 Optionsmenu 打开(onCreateOptionsMenu(..) 被调用),我收到以下警告:
Each time my Optionsmenu opens (onCreateOptionsMenu(..) is called), I get these warnings:
id 0 没有键盘"
和
"使用默认键映射:/system/usr/keychars/qwerty.kcm.bin"
"Using default keyMap: /system/usr/keychars/qwerty.kcm.bin"
我不明白他们的意思,有人知道吗?我不喜欢 this answer.
I couldn't find out what they mean, does anyone know ? I didn't like this answer.
这是我正在使用的简单代码:
Here's the simple code I'm using:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.menu.optmenu_start, menu);
return true;
}
和 optmenu_start.xml:
and the optmenu_start.xml:
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/optmenu_prefs"
android:title="@string/optmenu_prefs"
android:icon="@drawable/icon_menu_prefs"
/>
<item
android:id="@+id/optmenu_help"
android:title="@string/optmenu_help"
android:icon="@drawable/icon_menu_help"
/>
</menu>
谷歌的答案是
" 日志是正常的;它发生在设备第一次需要键盘映射时在一个过程中."
" The log is normal; it happens the first time a keymap is needed for a device in a process. "
http://groups.google.com/group/android-developers/browse_thread/thread/477caf755085b108
因此,如果您在 Activity1 之前启动 Activity2,您会在 Activity2 而不是 Activity1 中看到警告!
So therefore if you started Activity2 before Activity1 you would see the warning in Activity2 and not Activity1!
正如我所说,我认为很多开发人员都会收到此消息,这只是警告而不是错误;可以忽略.
As I said I think a lot of developers get this message and it's just a warning not an error; it can be ignored.
这篇关于“没有 id 0 的键盘"- 这是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
出现键盘时如何在iOS上调整UITextView的大小?How to resize UITextView on iOS when a keyboard appears?(出现键盘时如何在iOS上调整UITextView的大小?)
如何可靠地检测 iOS 9 上是否连接了外部键盘?How to reliably detect if an external keyboard is connected on iOS 9?(如何可靠地检测 iOS 9 上是否连接了外部键盘?)
如何关闭 iOS 键盘?How do I dismiss the iOS keyboard?(如何关闭 iOS 键盘?)
是否可以在 ios 越狱后使用外部键盘模拟触摸事件Is possible to simulate touch event using an external keyboard on ios jailbroken?(是否可以在 ios 越狱后使用外部键盘模拟触摸事件?)
Android 上的数字软键盘Numeric Soft Keyboard on Android(Android 上的数字软键盘)
如何从 iOS 应用程序上的自定义键盘检索击键?How do I retrieve keystrokes from a custom keyboard on an iOS app?(如何从 iOS 应用程序上的自定义键盘检索击键?)