ソフトキーボードで遊んでいます
環境設定にチェックボックスを作りました
<CheckBoxPreference
android:defaultValue="false"
android:key="OneColors"
android:summary="Show one color keys above the keyboard"
android:title="One color keys" >
その後、より多くのボタンを含むqwertycolor.xmlを作成しました
それから私は交換しました
this.mQwertyKeyboard = new EmojiKeyboard(this, R.xml.qwerty);
@onInitializeInterface()
と
SharedPreferences lala =
getSharedPreferences("com.keyboard_preferences", Context.MODE_PRIVATE);
if (lala.getBoolean("OneColors", true)){
this.mQwertyKeyboard = new EmojiKeyboard(this, R.xml.qwertycolor);
} else {
this.mQwertyKeyboard = new EmojiKeyboard(this, R.xml.qwerty);
}
私が今抱えている問題は、アプリ全体を強制終了して再度開いた後にのみ、キーボードが変更されることです