meliorence / meliorence/react-native-image-gallery

initialPage doesn't seem to be working on Android

Open
#111 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
717
Forks
298
PR merge metrics
No merged PRs in 30d

Description

<Gallery style={{ flex: 1, backgroundColor: 'black' }} images={this.state.galleryImages} initialPage={this.state.index} />

It doesn't seem to work whatever way I try it. the index is a number and everything seems to be done properly. It always starts on the first image in the array though. My React version is 0.57

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 by reproducing the Gallery example with initialPage set to a numeric index on Android, using the reported React 0.57 setup. Trace how Gallery receives and applies initialPage, then compare the Android behavior with the expected selected image. Done means the gallery opens on the requested image rather than always starting with the first one.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.