如何编辑android操作系统键盘的源代码?

如何编辑android操作系统键盘的源代码?,android,Android,我使用android键盘,但我想添加一行键,所以我从下载了该键盘的源代码,但我面临以下错误 无法解析导入com.android.inputmethodcommon import com.android.inputmethodcommon.InputMethodSettingsFragment; 您可以在Android中创建自己的自定义键盘,以显示任意数字或按键。使用,以及 有关键盘的更多自定义信息,请查看此项。我不知道您是否还需要有关此项的帮助,但您不需要IMEEPreferences文件,只

我使用android键盘,但我想添加一行键,所以我从下载了该键盘的源代码,但我面临以下错误

无法解析导入com.android.inputmethodcommon

import com.android.inputmethodcommon.InputMethodSettingsFragment;

您可以在Android中创建自己的自定义键盘,以显示任意数字或按键。使用,以及


有关键盘的更多自定义信息,请查看此项。

我不知道您是否还需要有关此项的帮助,但您不需要IMEEPreferences文件,只需将其删除即可。您希望转到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>