Home > Software design >  Why does my button go up when the keyboard appears in react native? button view position is absolute
Why does my button go up when the keyboard appears in react native? button view position is absolute

Time:11-01

Here are my code:

enter image description here

enter image description here

This is in android.

enter image description here

CodePudding user response:

In Folder Android > app > src > main > AndroidManifest.xml

<activity
  -------------
  android:windowSoftInputMode="adjustResize"
  -------------
</activity>

Change to :

<activity
  -------------
  android:windowSoftInputMode="adjustPan"
  -------------
</activity>

CodePudding user response:

Basically Your keyboard is not avoiding your view or component. so you'll have to wrap your Component in

<KeyboardAvoidingView>
    //your component
</KeyboardAvoidingView> 

additionally you can use props of keyboard avoiding view

  • Related