Closed alz10 closed 5 years ago
@Albert0405 "while im typing something in one of my TextInput, it didnt change the StatusBarBackgroundColor" I want to clarify this or add steps to reproduce, are you invoking the alert as you type something?
Im using your DropdownAlert in one of form, let say in Authentication Form. If the user typed nothing in the form then he/she tapped the login button, the DropdownAlert will be open in the screen for example withAlertType of warn and then i suddenly tried to type on the TextInput while the DropdownAlert is still open in the top of the app. When the DropdownAlert was closed after like 4seconds while me typing on my TextInput, it didnt turn the statusBarBackgroundColor to its original color, it changes to orange which is the color of warn im using.
Also i notice while the DropdownAlert is open and you suddenly tried to go back to your previous navigation, it also didnt turn the statusBarBackgroundColor to its original color
I tried this solution but didnt work
class TestsComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
statusbarColor: '#2699fb'
}
}
render() {
return (
<View
style={{
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#2699fb'
}}
>
<StatusBar backgroundColor={this.state.statusBarColor} barStyle="default" />
<DropdownAlert
useNativeDriver
closeInterval={2000}
ref={ref => (this.dropdown = ref)}
inactiveStatusBarBackgroundColor="#2699FB"
onClose={() => this.setState({ statusbarColor: '#2699fb' })}
/>
</View>
);
}
}
Possibly related to #169. I need to retest.
I was unable to reproduce using:
Here's my code, it's working perfectly fine, after the DropdownAlert (for example "error" which changes the statusBarBackgroundColor to red) have been shown to the screen, it changes the StatusBarBackgroundColor to its original color of "#2699fb" which is good and what i am expecting to happen but i notice while im typing something in one of my TextInput, it didnt change the StatusBarBackgroundColor to "#2699fb" and remain the color to what ever type of Alert for example "error" which is red, "warn" which is orange, "info" which is blue and so on.......