React Native: How to do a TextInput toolbar that moves up with the keyboard? -


for example, twitter or yik yak's create new post/comment on iphone.

i imagine has flex toolbar footer, kind of keyboard aware view (not sure library use), haven't been able put together.

example of separate textinput toolbar above keyboard:

enter image description here

example of textinput in toolbar moves & grows keyboard:

enter image description here

pretty simple, wrap component inside

<keyboardavoidingview>your views/components<keyboardavoidingview/> 

and giving behavior

behavior?: enum('height', 'position', 'padding')

contentcontainerstyle?: [object object]

the style of content container(view) when behavior 'position'.

keyboardverticaloffset: number

this distance between top of user screen , react native view, may non-zero in use cases.

from docs


Comments