leecade / leecade/react-native-swiper
Android上Active Dot存在Bug
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
当前版本的代码中,貌似把以前的代码替掉了
针对Android的render中,缺少onPageSelected: this.onScrollEnd,导致Android上Indicator没有效果
onScollEnd函数中,缺少以下代码
if (!e.nativeEvent.contentOffset) {
if (this.state.dir == 'x') {
e.nativeEvent.contentOffset = { x: e.nativeEvent.position * this.state.width };
} else {
e.nativeEvent.contentOffset = { y: e.nativeEvent.position * this.state.height };
}
}
而且在开启了loop以后,Indicator还是会有问题
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the Android render path and inspect the onPageSelected callback and the onScrollEnd function mentioned in the issue. Check the existing handling of contentOffset and the loop mode, then verify that the Android Indicator updates correctly both with loop disabled and enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100