Android adjustpan not working after the first time

前端 未结 8 920
生来不讨喜
生来不讨喜 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:48

    Usually the adjust pan doesn't work after the first time when we press the back button try to do that following way:- (can be implemented for the EditText, AutoCompleteTextView or any other view in which misbehaves)

     @Override
        public void onBackPressed() {
            editText.clearFocus();
            editText.setCursorVisible(false);
        }
    

    Hope It helps someone

提交回复
热议问题