Roger99
Roger99

Reputation: 992

On-screen keyboard resizes app when an input box is selected Apache Cordova Visual Studio?

I am trying to develop an app with the Apache Cordova tools for Visual Studio and i believed i had finished the project until I started using it on a device and the on-screen keyboard re-sized the entire app when it popped up. The application looks the way i would like it to until the user selects an input box and the on-screen keyboard pops up, which then makes the screen shrink to compensate for the keyboard.

How can I make it so that the keyboard just overlaps the layout already present instead of re-sizing it and making a new one? I can't seem to find any solutions on the internet so any help would be greatly appreciated.

Thanks

Upvotes: 2

Views: 893

Answers (1)

Kirupa Chinnathambi
Kirupa Chinnathambi

Reputation: 212

Dustin - you need to use the Keyboard plug-in to help customize this behavior. You can find the plug-in at NPM: https://www.npmjs.com/package/cordova-plugin-keyboard

The exact line of code that will give you what you want is:

Keyboard.shrinkView(false); 

Cheers,

Kirupa

Upvotes: 2

Related Questions