我正在玩Softkeyboard
我在我的偏好中设置了一个复选框
<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);
}
我现在遇到的问题是我的键盘发生了变化,但只有在杀死整个应用程序并再次打开它之后
答案 0 :(得分:0)
移动
解决了问题 SharedPreferences lala =
getSharedPreferences("eu.drgekko.rftoolz_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);
}
到onStartInput()