How to prevent auto scrolling of EditText when key

2019-09-02 03:20发布

Even i put scrollview or not, when my edit text request focus and keyboard appears, my view automatically scrolled to top a little bit. It breaks my design. I have to prevent this.

Could you please help me?

2条回答
叼着烟拽天下
2楼-- · 2019-09-02 03:48

Add this line in your Manifext.xml under your activity tag and make sure your activity must not use android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen".

android:windowSoftInputMode="adjustResize"

Please try it and let me know your comments if still you have problem..!!

查看更多
神经病院院长
3楼-- · 2019-09-02 03:52

Addthis

 android:windowSoftInputMode="adjustPan"

   android:isScrollContainer="false" 

in the manifest file

查看更多
登录 后发表回答