Open Rubioli opened 2 years ago
I'm also having this issue, did you find a work around?
nope still waiting for any response or any answers somewhere out there
You can try using something like this. I'm using it in my app to hide the header instead.
If you know how to add an easing transition here, please share :)
import * as React from 'react';
import { Keyboard } from 'react-native';
const ScreenHidingHeader = ({ navigation }) => {
const [isKeyboardOn, setKeyboardOn] = React.useState(false);
React.useEffect(() => {
const showSubscription = Keyboard.addListener("keyboardWillShow", () => {
setKeyboardOn(true);
});
const hideSubscription = Keyboard.addListener("keyboardWillHide", () => {
setKeyboardOn(false);
});
return () => {
showSubscription.remove();
hideSubscription.remove();
};
}, []);
return (
<>
{!isKeyboardOn ? <Text>this will be hidden</Text> : null }
<Text>this will stay</Text>
</>
)
};
In my login page I've used
BottomNavigation
and I want to hide the bottom navigation when the keyboard is active. I've tried withtabBarOptions={{ keyboardHidesTabBar: true }}
with no luck.Below is my complete page code:
Any help is much appreciated!
Packages versions: