EditText, adjustPan, ScrollView issue in android

China☆狼群 提交于 2019-11-29 03:50:28
Mukesh Parmar

I was suffering from the same issue and I a found solution. So, maybe it will help you.

Please give following attributes to ScrollView tag:

android:isScrollContainer="false"

And in manifest of your activity to :

android:windowSoftInputMode="adjustPan"
Santosh Kathait

In your manifest file inside activity tag use

android:windowSoftInputMode="adjustResize|stateVisible|stateAlwaysHidden" 

you just add this line in scrollview android:isScrollContainer="true"

Like something this

 <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:isScrollContainer="true"
        android:scrollbars="none">

just struggled for 3 hours to fix this same problem.

What worked for me is to remove "adjustPan" from the windowSoftInputMode in the manifest.

So I went from :

android:windowSoftInputMode="adjustResize|adjustPan|stateHidden"

to:

android:windowSoftInputMode="adjustResize|stateHidden"

and it fixed everything for me.

I hope this helps anyone else that stumbles upon this too. Funny enough, on my other screens it all still works regardless of the adjustPan.

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