Positioning EditText Above Keyboard

十年热恋 提交于 2019-11-30 17:27:49

In your Manifest file add the following code for this particular activity

<activity android:windowSoftInputMode="adjustPan">

Check this doc for more info.

use

android:windowSoftInputMode="stateVisible|adjustResize" 

in your Manifest file. See developer site for your reference

It happens sometimes that setting activity in manifest

android:windowSoftInputMode="stateVisible|adjustResize" 
android:windowSoftInputMode="adjustPan" 

not working with scrolling views containing EditText.

After research I figured out that to work in some cases parent layout has to be set android:fitsSystemWindows="true". Then native functionality of scrolling EditText above scrollbar working like a charm.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!