leecade / leecade/react-native-swiper
Swiper component style prop does not work on android
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Passing style prop to the <Swiper /> component does not work on android.
See snippet from here
return (
<ViewPagerAndroid ref='scrollView'
{...this.props}
initialPage={this.props.loop ? this.state.index + 1 : this.state.index}
onPageSelected={this.onScrollEnd}
style={{flex: 1}}>
{pages}
</ViewPagerAndroid>
)
I am raising a PR with a fix
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 at the Android rendering branch in src/index.js around line 567 and inspect how the Swiper props are passed to ViewPagerAndroid, with attention to the style prop. Reproduce the issue on Android and verify that a style supplied to Swiper is reflected by the rendered component without regressing the existing layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100