Skip to content Skip to sidebar Skip to footer

Phonegap: Resize Webview On Keyboard Display In Android

I have a modal similar (with fixed positioning) to what facebook has for the comments in feed/chat in messenger in the latest android release. What I want looks similar to this: S

Solution 1:

On my project created with phonegap 3.0, by default the app was full screen activity and the keyboard hid the app and the app was not resized.

I edited config.xml and set <preference name="fullscreen" value="false" />, then the app was no more be full screen and when the soft keyboard was opened, the app was resized to fit the rest of the screen.

Solution 2:

I found the solution.. for specially "sencha/phonegap/cordova" users.

Edit the Main activity in android manifest file add this attribute.

android:windowSoftInputMode="adjustNothing"

<activityandroid:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"android:windowSoftInputMode="adjustNothing"android:label="@string/app_name"android:launchMode="singleTop"android:name="com.company.appName.MainActivity"android:screenOrientation="portrait"android:theme="@android:style/Theme.Black.NoTitleBar"><intent-filter><actionandroid:name="android.intent.action.MAIN" /><categoryandroid:name="android.intent.category.LAUNCHER" /></intent-filter></activity>

Post a Comment for "Phonegap: Resize Webview On Keyboard Display In Android"