Android adjustpan not working after the first time

前端 未结 8 926
生来不讨喜
生来不讨喜 2020-12-01 05:55

My problem: starting from the second time the software keyboard is shown on the screen, it entirely hides my EditText.

Attribute android:windowSoftInputMode=\"adjus

8条回答
  •  忘掉有多难
    2020-12-01 06:36

    For me overriding onKeyPreIme doesn't work. So I override dispatchKeyEventPreIme instead.

    @Override
    public boolean dispatchKeyEventPreIme(KeyEvent event) {
        if(event.getKeyCode() == KeyEvent.KEYCODE_BACK){
         clearFocus();
        }
        return super.dispatchKeyEventPreIme(event);
    }
    

提交回复
热议问题