APSL / react-native-keyboard-aware-scroll-view

A ScrollView component that handles keyboard appearance and automatically scrolls to focused TextInput.
MIT License
5.27k stars 646 forks source link

Android | KeyboardAwareScrollView overlaps react-navigation header & statusbar #497

Closed turker0 closed 3 years ago

turker0 commented 3 years ago

Hi, I'dont thing its the right behavior. KeyboardAwareScrollView overlaps custom header and statusbar when text input is focused. I can avoid overlapping the statusbar when i set backgroundColor not transparent but i need to do it.

Navigation no custom codes.

Stack.Navigator Screen Stack.Navigator

Screen

Container ... TextInput TextInput TextInput ... Container

Container

SafeAreaView StatusBar backgroundColor='transparent' KeyboardAwareScrollView> {children} KeyboardAwareScrollView SafeAreaView

And i set <activity android:name=".MainActivity" ... android:windowSoftInputMode="adjustPan" ... />

transparent statusbar

not transparent

turker0 commented 3 years ago

Swaggy_McMuffin's solution works. This has nothing to do with KeyboardAwareScrollView and everything to do with your activity android:windowSoftInputMode being "adjustPan". Change it to "adjustResize" and make sure to recompile the apk - aka npx react-native run-android.

litinskii commented 6 months ago
image

have the same issue with adjustPan as doc mention