-1

I have a code like this:

<View>
  <View></View>
  <ScrollView>
    <View>
      <TextInput/>
    </View>
  </ScrollView>
  <View></View>
</View>

How can I handle it to response correctly to keyboard? Both android and ios??? i have 2 permenant views top and bottom of the screen, this views pushed up on keyboard show

Jamal
  • 27
  • 11

3 Answers3

0

Your question is really unclear, but what I think you need is KeyboardAvoidingView.

It's a built-in React Native component that resizes based on the keyboard height.

iuliu.net
  • 6,666
  • 6
  • 46
  • 69
  • my problem is the inside keyboard covers inner scrollview's content – Jamal Dec 17 '18 at 10:51
  • Well since KeyboardAvoidingView resizes when the keyboard is open, all of its elements will come a bit higher (obviously), so your input shouldn't be covered. – iuliu.net Dec 17 '18 at 10:55
0

To make sure the keyboard is not overlapping any important bits of your layout such as your text Input wrap your whole screen in KeyboardAvoidingView

https://facebook.github.io/react-native/docs/keyboardavoidingview

Annie Hill
  • 379
  • 3
  • 16
-1

Solved!!
I solved it by handling the display of elements (views) on keyboard show and hide by keyboard in react native docs

Jamal
  • 27
  • 11