我使用Android键盘,但我想补充键将其的一排,所以我下载了这款键盘的源代码https://android.googlesource.com/platform/packages/inputmethods/LatinIME/,但我面对以下错误如何编辑android os键盘的源代码?
进口com.android.inputmethodcommon不能得到解决
import com.android.inputmethodcommon.InputMethodSettingsFragment;
我使用Android键盘,但我想补充键将其的一排,所以我下载了这款键盘的源代码https://android.googlesource.com/platform/packages/inputmethods/LatinIME/,但我面对以下错误如何编辑android os键盘的源代码?
进口com.android.inputmethodcommon不能得到解决
import com.android.inputmethodcommon.InputMethodSettingsFragment;
您可以在Android中创建自己的自定义键盘,以显示任何数字或键。使用Keyboard,Keyboard.Row和Keyboard.Key
如需更多定制键盘,请查看此blog post。
我不知道你是否仍然需要这方面的帮助,但是你不需要这个imePreferences文件就可以删除它。您想要转到xml文件夹和qwerty.xml文件,您可以在其中添加和更改行和键。 只需添加一行所需的键。
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:keyHeight="@dimen/key_height"
>
<Row>
<Key android:codes="113" android:keyLabel="q" android:keyEdgeFlags="left"/>
<Key android:codes="119" android:keyLabel="w"/>
<Key android:codes="101" android:keyLabel="e"/>
<Key android:codes="114" android:keyLabel="r"/>
<Key android:codes="116" android:keyLabel="t"/>
<Key android:codes="121" android:keyLabel="y"/>
<Key android:codes="117" android:keyLabel="u"/>
<Key android:codes="105" android:keyLabel="i"/>
<Key android:codes="111" android:keyLabel="o"/>
<Key android:codes="112" android:keyLabel="p" android:keyEdgeFlags="right"/>
</Row>
我编辑了问题 –