Open e-biba-ofti opened 1 week ago
@e-biba-ofti have you tried to specify statusBarTranslucent and navigationBarTranslucent props on KeyboardProvider
level?
@kirillzyusko navigationBarTransparent
seems to work fine but the statusBarTranslucent
doesn't work. After checking it a bit more when I remove my status bar it works as expected or when I set my status bar as translucent it's working. But I don't want my status bar to be translucent
as the content will be drawn under it.
@edisoni1995 when you wrap app in KeyboardProvider
it will move to edge-to-edge
mode and app will be drawn under status bar. Since edge-to-edge
is not a default mode for RN app the KeyboardProvider
will try to match default RN behavior and add paddings.
On your screenshot these white paddings most likely are caused by this fact (i. e. it's paddings from KeyboardProvider
and for me it looks like you already handle safe-area paddings somewhere in your code). To remove these padding you will need to add navigationBarTranslucent
and statusBarTranslucent
props.
statusBarTranslucent
doesn't work in your case because you are using StatusBar
component and translucent
is false
by default, so you overwrite an initial config of KeyboardProvider
and you are adding white padding again.
I think in your case it'll be safe to add translucent
property to StatusBar - in this case it shouldn't draw anything under StatusBar
because react-native-keyboard-controller
uses its own implementation (this implementation is compatible with edge-to-edge
mode, unlike RN component) of StatusBar
and it becomes to be used automatically when you use KeyboardProvider
.
Can you share here two screenshots side by side:
react-native-keyboard-controller
integration;KeyboardProvider
(with translucent props) and with <StatusBar translucent />
in place?In my understanding these screenshots should be identical.
Here you have it, I made a red border just to be able to tell that some part of the content is going under the status bar.
The image on the right is the one with <StatusBar translucent />
and with translucent props for KeyboardProvider
.
@e-biba-ofti would you be able to provide a minimal reproduction example?
Something is definetely going wrong here, but without a code I can not say what exactly 😔
Would you be able also to try to comment out this line:
And re-run app again?
@kirillzyusko that would be very difficult to create for now but I will try to find a minimal reproducable example. I did the change in the android file and re-build android but nothing changed.
@e-biba-ofti got you! Then minimal reproduction example is highly appreciate - it can significantly reduce the time needed for fixing this problem! ❤️
The issue will be resolved soon - it's been merged to react-native-screens
but is yet unreleased. I posted this in another issue:
https://github.com/kirillzyusko/react-native-keyboard-controller/issues/592#issuecomment-2370922343
@RayKay91 oh, yeah, you are right, good catch! @e-biba-ofti did you use native-stack
with navigationBar*
options by any chance? If yes, then what is the version of react-native-screens
did you use?
Describe the bug When wrapping my app with
KeyboardProvider
it adds space looks like it tries to do the same<SafeAreaView>
does but I am already using<SafeAreaView>
partially in my app as in some screens is not needed. If I just disable it<KeyboardProvider enabled={false}>
then the app shows in full view.Expected behavior The app should show in full screen
Screenshots
Smartphone (please complete the following information):