Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adjust pan|adjust resize doen't seem to work on JellyBean 4.2.2-4.1.2

I have a ListView with EditTexts as items.

I have tried setting both the android:windowSoftInputMode="adjustPan" and "adjustResize" flags in the manifest, I have also tried adding "alwaysvisible" flag and it didn't help either.

But when the keyboard hovers over the text and I start typing the edit text box is no loner visible, it only pops up the first time it gains focus.

Edit: I have tested it on 4.3 and it worked as it supposed to work, the edittext was visible all the time, but on 4.2.1/4.2.2 it doesn't work.

like image 457
user1940676 Avatar asked Oct 31 '13 10:10

user1940676


1 Answers

on some specific vendors android firmwares, settings android:windowSoftInputMode for Activity tag in Manifest won't work...

possible workaround can be setting it directly from the java code, inside the onCreate() method, after setting the content view:

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);

it's a long shot, but for me it worked in some cases...

like image 191
Tal Kanel Avatar answered Oct 05 '22 22:10

Tal Kanel