The keyboard overlays page content when user interacts with text field in Nativescript

When Working on the Nativescript project, I was facing a problem. when the user clicks the text field6, the keyboard appears and some content of the page hides

 

You can see the above scenario when the keyboard comes up the text field 6 is hidden behind the keyboard. and we not able to see what we are typing in the last text field

to solve the above problem, we need to add the android:windowSoftInputMode in the activity tag in the AndroidManifest.xml file.

<activity
    ...
    android:windowSoftInputMode="adjustResize">

it will ensure that the system resizes the layout to the available space

you can get more information about the windowSoftInput -https://developer.android.com/training/keyboard-input/visibility

In the native script project, the AndroidManifest.xml file can be  found at  

ProjectName\App_Resources\Android\src\main\AndroidManifest.xml

You can see in the above screenshot that when the text field 6 comes into focus, the system will automatically resize the screen, and the content is no longer hidden.

 

References:-https://stackoverflow.com/questions/53980913/stop-keyboard-overlay-when-interacting-with-textfield-in-a-nativescript-applicat

 

Add comment