Picker on IOS in landscape mode rotates to portrait after selecting item
See original GitHub issueI have gone through these following points
- Check latest documentation: https://docs.nativebase.io/
- Check for existing open/closed issues for a possible duplicate before creating a new issue: https://github.com/GeekyAnts/NativeBase/issues
- Use the latest NativeBase release: https://github.com/GeekyAnts/NativeBase/releases
- Check examples from NativeBase KitchenSink
Issue Description
Open app in Landscape mode and go to Picker. Click Picker, new screen with options opens. Select an option from the Picker items in the new screen.
node, npm, react-native, react and native-base version, expo version if used, xcode version
"expo": "^34.0.4",
"native-base": "^2.13.5",
"react": "^16.8.3",
"react-native": "^0.59.8",
Expected behaviour
After selecting an option you return to the main screen in the orientation you were before (Landscape)
Actual behaviour
App orientation is set to Portrait.
Steps to reproduce
import React, { useState, useEffect } from 'react';
import {
Body, Right, Left, Icon, Header, Button, Title, Picker, View
} from 'native-base';
function LanguagePicker() {
const [language, setLanguage] = useState( 'nl');
function handleChangeLanguage(value) {
setLanguage(value);
}
return (
<View style={{flex: 1, height: '100%', justifyContent: 'center'}}>
<Picker
mode="dropdown"
iosHeader="Select language"
iosIcon={<Icon name="arrow-down" />}
placeholder="Select language"
placeholderStyle={{ color: '#000' }}
style={{ width: '100%' }}
itemTextStyle={{ color: '#000000' }}
selectedValue={language}
onValueChange={value => handleChangeLanguage(value)}
>
<Picker.Item label="Nederlands" key="0" value="nl" />
<Picker.Item label="English" key="1" value="en" />
</Picker>
</View>
);
}
export default LanguagePicker;
Is the bug present in both iOS and Android or in any one of them?
Only IOS, and only when in Landscape.
I tested this also on snack.expo (with own device, snack has only portrait mode!). Here is link to code: https://snack.expo.io/@anniekvandijk/language-dropdown
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Rotate the screen on your iPhone or iPod touch - Apple Support
Swipe down from the top-right corner of your screen to open Control Center. Tap the Portrait Orientation Lock button to make sure that...
Read more >How to change the UIImage picker camera orientation to ...
The issue is my UIImagePicker gets open perfectly in all orientation but the camera gets rotated 90 degree and comes in half screen...
Read more >Enabling Orientation Changes for Selected View Controllers
One of the features in our app is Charts, which can be viewed in portrait and landscape mode. Also when the device rotates...
Read more >Working With Device Rotations
Rotations on Devices. iPhone. ○ Support rotation if it complements the design. ○ Camera app supports landscape and portrait. ○ Weather app only...
Read more >My iPhone or iPad Screen Won't Rotate. How Do I Fix It?
If your iPhone display is stuck in portrait and won't rotate to landscape even when you hold your handset sideways, the Portrait Orientation...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
60.5
. Are you sure it’s not an expo issue?Hi @anniekvandijk , as we have tested it and found no issue, closing this now. Let us know if the issue still persists.