leecade / leecade/react-native-swiper

<Image> resizeMode is ignored in the Swiper.

Open
#232 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Attempting to resize large images to fit into the scroll however the resizeMode is having no effect

<Swiper style={style.wrapper}>
    <Image source={huge} style={{flex: 1, resizeMode: 'stretch'}} />
    <Image source={square} style={{flex: 1, resizeMode: 'cover'}} />
    <Image source={selfie} style={{flex: 1, resizeMode: 'contain'}} />
</Swiper>

Did not work with the <View> surrounding it either, the <View> was removed because it caused the images to change extremely jittery. The images would change instantly before the transition even started.

Anyway, not being able to resize images to fit the swipe box is a major concern.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Swiper component and reproduce the issue with the three Image examples using resizeMode values of stretch, cover, and contain. Compare the behavior with and without the surrounding View, then verify that images resize correctly inside the swipe box without jitter or changing before the transition begins.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.