Jonathan Dang
Jonathan Dang

Reputation: 51

WebView flickering when keyboard show up in PhoneGap app

I am developing a web app on PhoneGap framework.

I found a weird situation which only happend on Android 4.0 ICS device.

when I tap on an input, the whole view will shrink to fit the new height, it happend again after I push the back button to dismiss the keyboard, flickering again.

the problem only happend when I wrap the code inside native container(PhoneGap), it won't flickering in stock browser.

any ideas?

PhoneGap 2.0.0

Upvotes: 0

Views: 2048

Answers (4)

Yogesh Bansal
Yogesh Bansal

Reputation: 11

I encountered the same issue, and this solution worked perfectly for me:

Add the following attribute to the tag in your AndroidManifest.xml file:

android:windowSoftInputMode="adjustPan|stateHidden"

This should resolve the WebView flickering issue when the keyboard appears.

Upvotes: 0

Kamaljit
Kamaljit

Reputation: 505

i have tried this, and it worked form me :)

set this line in activity tag of android manifest file android:windowSoftInputMode="adjustPan|stateHidden"

Upvotes: 0

rjurado01
rjurado01

Reputation: 5535

I resolve the problem seting:

<application android:hardwareAccelerated="false" ...>

in your activity manifest file (my_app/platforms/android/AndroidManifest.xml).

Upvotes: 0

Jonathan Dang
Jonathan Dang

Reputation: 51

I found answer on SO.

Android WebView Hardware Accelerated Keyboard Glitch

set android:windowSoftInputMode="adjustPan" in your activity manifest file,

it solve my problem.

Upvotes: 1

Related Questions