The soft keyboard in my Phonegap 3.1 covers the input field in my Android 4.x. This problem was very annoying, and I almost posted the question just now. But suddenly a spark arises, I integrated the responses from several messages into Stackoverflow and got the right solution. I just want to post it here for future reference. There are two key steps:
- Go to your config.xml, disable full-screen mode: (many messages are omitted by this part)
<preference name="stay-in-webview" value="false">
2. In config.xml add the following line:
<preference name="android-windowSoftInputMode" value="adjustResize">
Alternatively, if you use the SDK, you can go to your AndroidManifest.xml project and add:
android:windowSoftInputMode="adjustResize" to the <activity> attribute
The above two lines of code should have the same effect after building the application using a phone saver.
Then run the application, the keyboard should no longer close your input.
Feel free to add anything if the solution does not work for you.
source share