Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EditText, adjustPan, ScrollView issue in android

I have a EditText which is enclosed in ScrollView, but when the keyboard comes up.

You can NOT scroll down to the fields that are now covered. I have tried adding adjustSize, adjustPan in the manifest and in the class.

But its not working..

like image 331
developer Avatar asked Jan 30 '14 06:01

developer


3 Answers

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"
like image 172
Mukesh Parmar Avatar answered Nov 14 '22 09:11

Mukesh Parmar


In your manifest file inside activity tag use

android:windowSoftInputMode="adjustResize|stateVisible|stateAlwaysHidden" 
like image 7
Santosh Kathait Avatar answered Nov 14 '22 09:11

Santosh Kathait


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.

like image 4
JJ Du Plessis Avatar answered Nov 14 '22 09:11

JJ Du Plessis