Commit e23e33df authored by xwenliang's avatar xwenliang

android toggle bug

parent 1ba6216e
...@@ -6,9 +6,6 @@ A Native Picker with high performance. ...@@ -6,9 +6,6 @@ A Native Picker with high performance.
pure javascript version -> [v3.0.5](https://github.com/beefe/react-native-picker/tree/pure-javascript-version) pure javascript version -> [v3.0.5](https://github.com/beefe/react-native-picker/tree/pure-javascript-version)
![ui](./doc/ui.gif)
![ui2](./doc/ui2.jpg) ![ui2](./doc/ui2.jpg)
###Documentation ###Documentation
......
doc/ui2.jpg

32.9 KB | W: | H:

doc/ui2.jpg

70.8 KB | W: | H:

doc/ui2.jpg
doc/ui2.jpg
doc/ui2.jpg
doc/ui2.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -110,6 +110,16 @@ export default class PickerTest extends Component { ...@@ -110,6 +110,16 @@ export default class PickerTest extends Component {
}); });
} }
_toggle() {
Picker.toggle();
}
_isPickerShow(){
Picker.isPickerShow(status => {
alert(status);
});
}
render() { render() {
return ( return (
<View style={{height: Dimensions.get('window').height}}> <View style={{height: Dimensions.get('window').height}}>
...@@ -119,6 +129,12 @@ export default class PickerTest extends Component { ...@@ -119,6 +129,12 @@ export default class PickerTest extends Component {
<TouchableOpacity style={{marginTop: 10, marginLeft: 20}} onPress={this._showAreaPicker.bind(this)}> <TouchableOpacity style={{marginTop: 10, marginLeft: 20}} onPress={this._showAreaPicker.bind(this)}>
<Text>AreaPicker</Text> <Text>AreaPicker</Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity style={{marginTop: 10, marginLeft: 20}} onPress={this._toggle.bind(this)}>
<Text>toggle</Text>
</TouchableOpacity>
<TouchableOpacity style={{marginTop: 10, marginLeft: 20}} onPress={this._isPickerShow.bind(this)}>
<Text>isPickerShow</Text>
</TouchableOpacity>
</View> </View>
); );
} }
......
...@@ -67,8 +67,9 @@ export default { ...@@ -67,8 +67,9 @@ export default {
}, },
isPickerShow(fn){ isPickerShow(fn){
Picker.isPickerShow(hide => { //android return show or not, ios return hide or not...
fn(!hide); Picker.isPickerShow(status => {
fn(android ? status : !status);
}); });
} }
}; };
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment