所以我实现了这个自定义键盘布局:
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="33%p" android:horizontalGap="0px"
android:verticalGap="0px" android:keyHeight="54dip">
<Row>
<Key android:codes="8" android:keyLabel="1" android:keyEdgeFlags="left" />
<Key android:codes="9" android:keyLabel="2" />
<Key android:codes="10" android:keyLabel="3" />
<Key android:codes="75" android:keyLabel="°" android:keyEdgeFlags="right" />
</Row>
<Row>
<Key android:codes="11" android:keyLabel="4" android:keyEdgeFlags="left" />
<Key android:codes="12" android:keyLabel="5" />
<Key android:codes="13" android:keyLabel="6" />
<Key android:codes="39" android:keyLabel="'" android:keyEdgeFlags="right" />
</Row>
<Row>
<Key android:codes="14" android:keyLabel="7" android:keyEdgeFlags="left" />
<Key android:codes="15" android:keyLabel="8" />
<Key android:codes="16" android:keyLabel="9" />
<Key android:codes="97" android:keyLabel=""" android:keyEdgeFlags="right" />
</Row>
<Row>
<Key android:codes="34" android:keyLabel="," android:keyEdgeFlags="left" />
<Key android:codes="7" android:keyLabel="0" />
<Key android:codes="67" android:keyIcon="@drawable/sym_keyboard_delete"
android:iconPreview="@drawable/sym_keyboard_delete" />|
<Key android:codes="0x0008" android:keyLabel="-" android:keyEdgeFlags="right" />
</Row>
</Keyboard>
最大的问题是某些字符是小写的而其他字符是大写的(例如:'是小写的,是大写的),因此我尝试将shift-value加上小写的值加总,但它不起作用..我搜索如何做但我没有发现任何关于......
任何人都知道这样做的方法吗? 感谢