-1

When I click(or use InputField.Select or use InputField.ActivateInputField) the InputField on the huawei phone,the keyboard for the input method does not appear,only the input window appears at the bottom,I need to click the input window again,the keyboard will open.

only input window

open completely

How to make the keyboard open completely with just one click?

lik
  • 1
  • 2

1 Answers1

0

Well, I did it myself.Use aar of android studio. Key function:

public void SetKeyboard(boolean isShow) {
    InputMethodManager imm = (InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
    if (isShow) {
        imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
    } else {
        imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);
    }
}
Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
lik
  • 1
  • 2