Open ggunti opened 4 years ago
The App I am developing has this issue too, and this problem only occurs in iOS also
I used React native inspector to see what that box is, and it is called "KeyboardAvoidingView".
Yes, it happen only on iOS. Did you find a solution for this?
Sorry, I haven't solved this problem yet. I tried to update the version of react-navigation but the box is still there.
@ggunti Hey, after some procrastination, I found the solution here https://github.com/wonday/react-native-orientation-locker/issues/106, just add headerMode="none" to the stack and the problem is gone. Like this,
<Stack
panHandlers={null}
hideNavBar
key="root"
headerMode="none"
>
@ming436534 Thank you very much, it works !!!
after setting headerMode to none my header is gone. After setting headerMode="screen", my problem is solved now.
@ming436534 Thank you very much, it works !!!
Version
Tell us which versions you are using:
Expected behaviour
My screen is locked in portrait mode (using the
react-native-orientation-locker
library). Then, I press the 'View Scores' button, as you can see below (it just executes the() => Actions.viewGroupScores()
function):Then, I am redirected to 'viewGroupScores' scene, which just set the orientation to landscape mode inside
componentDidMount
:I expect to see the 'viewGroupScores' scene in landscape mode.
Actual behaviour
ONLY ON IOS. The 'viewGroupScores' scene is shown in landscape mode, but it contains some strange white box at the right side, like you can see in the following screenshots (I tried to modify header in different ways, I thought that it is a problem with my stylesheets):
The 'viewGroupScores' scene looks okay in portrait mode, it has this problem only in landscape.
Steps to reproduce
For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here. 1. 2. 3.
Reproducible Demo
Please provide a minimized reproducible demonstration of the problem you're reporting.
Issues that come with minimal repro's are resolved much more quickly than issues where a maintainer has to reproduce themselves.
package.json
file:App.js
(main) fileInputScores/InputScores.page.js
file:InputScores/InputScores.js
file:ViewGroupScores/ViewGroupScores.page.js
file:ViewGroupScores/ViewGroupScores.js
file:common/Container.js
file:common/BackButton.js
file:common/ModalSelector.js
file:common/Footer.js
file:common/index.js
file:constants/index.js
file:styles/colors.js
file: