-
Notifications
You must be signed in to change notification settings - Fork 505
Open
Description
Hi @FuYaoDe,
I am trying to update the status bar color (in Android) to match background of each page of the onboard.
My render function looks like this:
render() {
return (
<View>
<StatusBar
backgroundColor={shadeStatusBarColor(this.state.statusBarColor, -0.3)}
/>
<AppIntro
onDoneBtnClick={this.doneBtnHandle}
onSkipBtnClick={this.onSkipBtnHandle}
onSlideChange={this.onSlideChangeHandle}
pageArray={this.state.pageArray}
/>
</View>
);
}
On the slide change callback I have this:
onSlideChangeHandle = (index, total) => {
this.setState({ statusBarColor: this.state.pageArray[index].backgroundColor, currentPage: index });
}Doing this, the color of the statusbar changes, but the pagination is reset to the first position.
I also tried to do this change directly in the library (I want to make a PR to add this feature to the library also), but the behaviour is the same, the page position is not persisted.
Do you have any tips to fix this?
Thanks for the great work.
shareefhiasat
Metadata
Metadata
Assignees
Labels
No labels
