[否键盘ID 0" - 这是什么意思? [英] "No keyboard for id 0" - what does it mean?
问题描述
每次我Optionsmenu打开(onCreateOptionsMenu(..)被调用) 我得到这些警告:
没有键盘ID 0
和
使用默认的键盘对应: /system/usr/keychars/qwerty.kcm.bin
我无法找出他们的意思是,没有人知道?我不喜欢这个答案。
下面是简单的code我使用:
@覆盖
公共布尔onCreateOptionsMenu(功能菜单){
super.onCreateOptionsMenu(菜单);
。getMenuInflater()膨胀(R.menu.optmenu_start,菜单);
返回true;
}
和optmenu_start.xml:
<菜单的xmlns:机器人=http://schemas.android.com/apk/res/android>
<项目
机器人:ID =@ + ID / optmenu_ preFS
机器人:标题=@字符串/ optmenu_ preFS
机器人:图标=@可绘制/ icon_menu_ preFS
/>
<项目
机器人:ID =@ + ID / optmenu_help
机器人:标题=@字符串/ optmenu_help
机器人:图标=@可绘制/ icon_menu_help
/>
< /菜单>
谷歌的答案
的日志是否正常;它发生在第一时间键盘布局是需要的设备 的一个过程。
<一个href="http://groups.google.com/group/android-developers/browse_thread/thread/477caf755085b108">http://groups.google.com/group/android-developers/browse_thread/thread/477caf755085b108
因此,因此,如果你之前活动1开始活性2,你会看到在活性2的警告,而不是活性1!
正如我所说的,我认为很多开发商得到这个消息,这只是一个警告,不是错误;它可以被忽略。
Each time my Optionsmenu opens (onCreateOptionsMenu(..) is called), I get these warnings:
"No keyboard for id 0"
and
"Using default keyMap: /system/usr/keychars/qwerty.kcm.bin"
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;
}
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>
Google's answer is
" 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
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&QUOT; - 这是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!