-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Header doesn't update when scroll the viewpage in Android #2
Comments
Hi and thanks :) I haven't had time to test the app properly on an Android device, I plan to do that very soon. I think if you check out the latest version of the repo, you'll see the code has updated a bit, it might work. Animations are now used to display the headers for different locations. Check it out, let me know :) |
hmmm....I just update your latest code, it still does not work in Android device, seems the this.setState({current: index}) doesn't trigger re-render. I am new to React native, I will try to do some debug. :-) |
Ok thanks, I'll try and get a working Android version sometime next week. |
Hey, I found the root cause, it is because the onScroll callback of swiper is not supported in Android, so I add and it can update the header now :-) |
onSelectedIndexChange(index, offset) {
// this is not curently used
this.state.current.setValue(index);
}
when scroll the viewpage, the onSelectedIndexChange is called, but the Header doesn't update the relative City info. It works in IOS.
The text was updated successfully, but these errors were encountered: