[英]How to change background color and/or key color of Android soft keyboard without creating custom keyboard
[英]Custom Keyboard or Soft Keyboard ??? for color change
是否可以更改軟鍵盤的顏色(android默認值)(在App中還是在外部),或者我是否需要為此自定義鍵盤以及其他功能?我可以使用與Android設備相同的軟鍵盤,但使用另一種語言(更改鍵碼???)我想它將有一個按鈕可以在兩種語言之間進行更改,但是請回答我這兩個問題非常重要...! sry和thx以及如何使用不同語言的鍵盤打開應用程序
您應該為每種支持語言使用單獨的Keyboard xml布局文件創建自定義鍵盤。 然后使用switchToNextInputMethod()
在語言之間進行更改。 首先請看官方文檔 。
更新:只需將keyboard.xml
更改為
<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="Խ" android:keyEdgeFlags="left" />
<Key android:codes="9" android:keyLabel="Ա" />
<Key android:codes="10" android:keyLabel="Ք" android:keyEdgeFlags="right" />
</Row>
<Row>
<Key android:codes="11" android:keyLabel="Ս" android:keyEdgeFlags="left" />
<Key android:codes="12" android:keyLabel="Տ" />
<Key android:codes="13" android:keyLabel="Ն" android:keyEdgeFlags="right" />
</Row>
<Row>
<Key android:codes="14" android:keyLabel="Ց" android:keyEdgeFlags="left" />
<Key android:codes="15" android:keyLabel="Գ" />
<Key android:codes="16" android:keyLabel="Մ" android:keyEdgeFlags="right" />
</Row>
<Row>
<Key android:codes="67" android:keyIcon="@drawable/sym_keyboard_delete"
android:iconPreview="@drawable/sym_keyboard_delete"
android:keyEdgeFlags="left" />
<Key android:codes="7" android:keyLabel="ԳՒՆ" />
<Key android:codes="66" android:keyEdgeFlags="right"
android:keyIcon="@drawable/sym_keyboard_feedback_return"
android:iconPreview="@drawable/sym_keyboard_feedback_return" />
</Row>
</Keyboard>
在這個例子中,結果是
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.