Description
🐛 Bug Report
The picker on Android is always shown as a dropdown, even if the mode is set to dialog. On RN 0.58.6 it works according to the mode that is set ("dialog" or "dropdown").
To Reproduce
Initialize a new react native project: react-native init testPicker
Add the code example for the picker attached below to the return, as well in the constructor this.state = {language: "Java"};
Run the project: react-native run-android
Expected Behavior
I expect that when the picker mode is set to "dialog" (or not set, because the default mode is "dialog") to open the items in a new modal window, not as dropdown anchored to the picker view
Code Example
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>Welcome to React Native!</Text>
<Text style={styles.instructions}>To get started, edit App.js</Text>
<Text style={styles.instructions}>{instructions}</Text>
<Picker selectedValue={this.state.language} style={{height: 50, width: 100}} mode={"dialog"} onValueChange={(itemValue, itemIndex) => this.setState({language: itemValue}) }> <Picker.Item label="Java" value="java" /> <Picker.Item label="JavaScript" value="js" /> </Picker>
</View>
);
}
Environment
react-native --version
react-native-cli: 2.0.1
react-native: 0.59.1
react-native info
info
React Native Environment Info:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Memory: 23.85 GB / 31.88 GB
Binaries:
Yarn: 1.5.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5314842