0

ソフトキーボードで遊んでいます

環境設定にチェックボックスを作りました

        <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);
    }

私が今抱えている問題は、アプリ全体を強制終了して再度開いた後にのみ、キーボードが変更されることです

4

1 に答える 1

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()

@GabeSechanへ
のthnx

于 2013-06-02T19:36:00.700 に答える