android : keyboard overlaps input field

12,278 views
Skip to first unread message

maales

unread,
May 25, 2012, 5:22:07 AM5/25/12
to phonegap
Hi all,

I've an input field in a webview, when clicking on input the keyboard
is shown but it comes over the input field.
I tried putting windowSoftInputMode="adjustPan" in androidManifest but
still the same.
When opening the same html page in device's browser everything is ok.
Any ideas ?

Regards

maales

unread,
Jun 5, 2012, 3:31:20 AM6/5/12
to phonegap
Hi all !

any ideas ??

Joe

unread,
Jun 20, 2012, 11:44:48 AM6/20/12
to phon...@googlegroups.com
You can add an onfocus event handler and scroll to the input box.

Joe

unread,
Jun 20, 2012, 11:44:55 AM6/20/12
to phon...@googlegroups.com
You can add an onfocus event handler and scroll to the input box.

On Friday, May 25, 2012 2:22:07 AM UTC-7, maales wrote:

maales

unread,
Jun 26, 2012, 5:03:19 AM6/26/12
to phon...@googlegroups.com
yes i did ... :-(

Le vendredi 22 juin 2012 16:51:04 UTC+2, gdfesta a écrit :
Did you set to full screen the DriodGap Activity???
Check your android manifest
        <activity android:name="MainActivity" android:screenOrientation="landscape"
                  android:configChanges="orientation|keyboardHidden|keyboard">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>

and your main activity
        super.onCreate(savedInstanceState);
        super.setIntegerProperty("splashscreen", R.drawable.loader);
        super.loadUrl("file:///android_asset/htmlCode/index.html", 10000);

maales

unread,
Jun 26, 2012, 5:05:07 AM6/26/12
to phon...@googlegroups.com
sure but it is not a good solution for me ... it works on android4 and in native browser on android 2.2+
so why does the webview acts as described ?

rlay3

unread,
Dec 5, 2012, 6:43:43 PM12/5/12
to phon...@googlegroups.com
anyone know the solution to this? For me the keyboard covers the input and only scrolls to above the keyboard when I start typing.
I'd like the input to appear above the keyboard as soon as the input is focused. 

elsigh

unread,
Jan 18, 2013, 7:18:40 PM1/18/13
to phon...@googlegroups.com
adjustResize is really the only way to go, because otherwise you can't adjust your UI to the size of the keyboard effectively.

On Thursday, January 17, 2013 11:27:24 AM UTC-8, Armin Krauss wrote:
Hi maales,

I seem to have a similar problem and tried to add android:windowSoftInputMode="adjustPan"
to the AndroidManifest.xml without an effect.

Then I did android:windowSoftInputMode="adjustResize" and that works. Give it a try.

Armin

Gary Shergill

unread,
Jul 15, 2013, 6:42:44 AM7/15/13
to phon...@googlegroups.com
Hi all,

I know this is an old post, but I'm seeing the same on my Android app now. I am using 2.9.0.

I have forced the app into Landscape and I see this problem - selecting an input field isn't moving the keyboard below the input, it just covers it.

How would I go about fixing this with the above change? There is no AndroidManifest.xml for me... just the config.xml for phonegap.

I tried adding:

    <preference name="windowSoftInputMode"        value="adjustResize" />

But no luck.

Thank you.

Kind Regards,

Gary Shergill



On Thursday, 17 January 2013 19:27:24 UTC, Armin Krauss wrote:
Hi maales,

I seem to have a similar problem and tried to add android:windowSoftInputMode="adjustPan"
to the AndroidManifest.xml without an effect.

Then I did android:windowSoftInputMode="adjustResize" and that works. Give it a try.

Armin



On Friday, May 25, 2012 5:22:07 AM UTC-4, maales wrote:

Kopax Anderson

unread,
Jan 10, 2014, 12:15:59 PM1/10/14
to phon...@googlegroups.com
I did found a workaround for this, tell me if it worked for you :



add a call to this function in your app CordovaActivity right after super.loadUrl....


   
    private void preventFullScreen(){
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
        getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
Reply all
Reply to author
Forward
0 new messages