cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Armno Prom (JIRA)" <>
Subject [jira] [Commented] (CB-4404) android:windowSoftInputMode does not work
Date Wed, 28 Aug 2013 04:42:51 GMT


Armno Prom commented on CB-4404:

I have the same problem with slightly dev environment. I tested with Cordova 3.0 on a Samsung
Galaxy Tab 2 running Android 4.1.1.

Here are my steps to reproduce.

1. Create new Cordova project using {{cordova create <project_name>}}
2. Edit {{www/index.html}} by adding {{<input type="text" name="text1" style="margin-top:
1000px">}} below {{<h1>Apache Cordova</h1>}}
3. Add Android platform using {{cordova platform add android}} in the created directory
4. Run {{cordova build android}}.
5. Connect the device via USB and run {{cordova run android}}.
6. Tab on the input field (which falls down to the very bottom of the page). The keyboard
shows up and cover the input field so I cannot see what I'm typing.

I opened {{/platforms/android/AndroidManifest.xml}}, the default value of {{android:windowSoftInputMode}}
is {{adjustPan}}. I tried to change {{android:windowSoftInputMode}} value to {{adjustResize}}
but it didn't work.

Then I changed preference {{fullscreen}} in {{www/config.xml}} from {{true}} to {{false}}
and the keyboard didn't cover the input field. Both {{adjustPan}} and {{adjustResize}} behave
the same though.

Below are screenshots captured

initial screen. input element is pushed down to the bottom.

{{fullscreen}} to {{true}} in {{www/config.xml}} (both {{adjustResize}} and {{adjustPan}})

{{fullscreen}} to {{false}} in {{www/config.xml}} (both {{adjustResize}} and {{adjustPan}}).
notice the page's background.

Previously, my device used Android 4.0.4 (or 4.0.3 I'm not sure) and didn't have this problem.
It happens after I updated the software to 4.1.
> android:windowSoftInputMode does not work
> -----------------------------------------
>                 Key: CB-4404
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.9.0
>         Environment: * Mac OS 10.7.5
> * Android 4.1.2 and 4.2.2 emulator using Intel's x86 images
>            Reporter: Daniel Trebbien
>            Assignee: Joe Bowser
>            Priority: Minor
> _I recently posted a description of this issue to the phonegap group at []._
> I am testing out PhoneGap 2.9.0 in the Android emulator (using Intel's x86 images), and
I am seeing the issue that the android:windowSoftInputMode setting is not having an effect.
 By default, the setting is set to "adjustPan" in the generated project, but when I actually
focus a text <input>, the soft keyboard appears on top of the app, but does not pan
the main window, and the <input> is usually hidden beneath the keyboard as a result.
> Steps to reproduce:
> # Create a new PhoneGap 2.9.0 project using the {{cordova create}} utility.  Add the
'android' platform.
> # Open the project in Eclipse.
> # Edit {{index.html}} to add {{<br><br><br><br><br><br><br><input
placeholder="Text box">}} below the {{<h1>Apache Cordova</h1>}} heading.
> # Run the app in Android 4.1.2 or 4.2.2 emulator.
> # Tap the <input> and notice that the soft keyboard is placed over the app and
the <input> is hidden beneath.
> # Try changing the android:windowSoftInputMode setting in {{AndroidManifest.xml}} to
"adjustResize", reload the app, and notice that the app is not resized when the <input>
receives keyboard focus.
> I am seeing this problem in Android 4.1.2 and 4.2.2 emulator.  In Android 4.0.3 emulator,
the app pans as expected.
> The strange thing is that if I load the www/ files in the Browser and focus the <input>,
then the window is resized to fit the soft keyboard like normal.  This seems to imply that
android:windowSoftInputMode works fine in the emulator, but there is some issue in PhoneGap
that is preventing it from working.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message