Skip to content

Commit

Permalink
Shift key icons need to be loaded before setup DefaultKeyboard. (#3051)
Browse files Browse the repository at this point in the history
  • Loading branch information
daoshengmu committed Mar 26, 2020
1 parent 97b2c5e commit 7311bdc
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -297,6 +297,9 @@ private void initialize(Context aContext) {

mDefaultKeyboardSymbols = new CustomKeyboard(aContext.getApplicationContext(), R.xml.keyboard_symbols);
mKeyboardNumeric = new CustomKeyboard(aContext.getApplicationContext(), R.xml.keyboard_numeric);
mShiftOnIcon = getResources().getDrawable(R.drawable.ic_icon_keyboard_shift_on, getContext().getTheme());
mShiftOffIcon = getResources().getDrawable(R.drawable.ic_icon_keyboard_shift_off, getContext().getTheme());
mShiftDisabledIcon = getResources().getDrawable(R.drawable.ic_icon_keyboard_shift_disabled, getContext().getTheme());
setDefaultKeyboard();

mKeyboardView.setPreviewEnabled(false);
Expand Down Expand Up @@ -327,9 +330,6 @@ private void initialize(Context aContext) {
mPopupKeyboardView.setOnKeyboardActionListener(this);
mKeyboardNumericView.setOnKeyboardActionListener(this);

mShiftOnIcon = getResources().getDrawable(R.drawable.ic_icon_keyboard_shift_on, getContext().getTheme());
mShiftOffIcon = getResources().getDrawable(R.drawable.ic_icon_keyboard_shift_off, getContext().getTheme());
mShiftDisabledIcon = getResources().getDrawable(R.drawable.ic_icon_keyboard_shift_disabled, getContext().getTheme());
mCapsLockOnIcon = getResources().getDrawable(R.drawable.ic_icon_keyboard_caps, getContext().getTheme());
mCloseKeyboardButton = findViewById(R.id.keyboardCloseButton);
mCloseKeyboardButton.setOnClickListener(v -> dismiss());
Expand Down

0 comments on commit 7311bdc

Please sign in to comment.