Android: Detect softkeyboard open

后端 未结 8 2118
栀梦
栀梦 2020-11-29 07:31

When the soft keyboard opens I want a scroll view to scroll down to the bottom.

For this I can use: fullScroll(View.FOCUS_DOWN);

But how do I fire that comma

8条回答
  •  自闭症患者
    2020-11-29 07:48

    The only way I was able to work around this is by setting my activity's android:windowSoftInputMode="adjustResize" and then embed a custom "detector view" in the layout to handle a container size change and propagate that as a custom event (via a Listener) for soft keyboard on/off.

    The following post describes an approach to implementing it: EditText does not trigger changes when back is pressed

提交回复
热议问题