In React Native Expo, the entire screen gets squished by keyboard to cover one half

Viewed 346

Basically, when I open a textInput, the keyboard takes up half the bottom half of the screen and the screen is then forced to take up the remaining space in the top half. This results in my entire app being squished into half of a screen. I'm using Expo so I can't use android.xml. I'm using React Native Expo and I tried to use Keyboard Avoiding View, added " "softwareKeyboardLayoutMode": "pan" " inside my app.json, and tried using scrollview but none of these helped. I heard that this problem was caused because I used percentages to set dimensions of elements in my app. What do I need to do to remove it?

1 Answers

Maybe you have an KeyboardAvoidingView around all your screen, try to let the KeyboardAvoidingView only around what you want to avoid when you click on a text input.

Related