GithubHelp home page GithubHelp logo

fidme / react-native-photo-gallery Goto Github PK

View Code? Open in Web Editor NEW
119.0 119.0 29.0 5.4 MB

Simple, yet powerful image gallery for React Native. Features zoom and pagination ! ๐Ÿ–ผ

License: MIT License

JavaScript 100.00%
android gallery ios photos react-native

react-native-photo-gallery's People

Contributors

haridasu avatar keshraa avatar michaelvilleneuve avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-native-photo-gallery's Issues

Failed to build in android RN 0.47.2

android/src/main/java/com/reactnative/photoview/PhotoViewPackage.java:18: error: method does not override or implement a method from a supertype
@OverRide
^
Note: node_modules/react-native-photo-view/android/src/main/java/com/reactnative/photoview/ResourceDrawableIdHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
:react-native-photo-view:compileReleaseJavaWithJavac FAILED

react-native-cli: 2.0.1
react-native: 0.47.2

alwx/react-native-photo-view#80

Thumbnails Don't Render

Facing an issue with this plugin. I have a Gallery that is loading a dynamic array of images, anywhere from 8 to 30. Now, I've added logic to disable scrolling on the <FlatList component, and instead want to rely on scrolling/clicking the thumbnails from <Pagination to navigate. However, on occasion, the thumbnails don't render (the black ribbon does, but not the individual thumbnails):

screenshot 2018-11-23 13 25 42

The only way I can reliably get the thumbnails to render is by scrolling the component, which, since it is invisible, is not obvious UX:

screenshot 2018-11-23 13 27 01

Note: I've added an <ActivityIndicator to each <SwiperThumb, so I can tell if they are loading, so it's not an issue with the individual thumbnails not rendering:

screenshot 2018-11-23 13 28 47

Aside from the modifications to disable scrolling and the add an activity indicator on loading thumbnails, I haven't changed this plugin.

Any ideas what could be causing this?

Slowness on 100+ images.

Hi,

I tried with 100+ images. When click on the thumb it is taking time to load that slide. Also the image in the slide cutting from left and right end.

Add custom components to each image slide

Hi Michael,

first of all thank you for this awesome library. Really slick, good looking solution!
I was wondering if there is a way to add some custom views to each slide. In my case I wanna show some tags, related to the image. Any idea how I could achieve this?

Best wishes, Sven.

Support remote images

E.g.:

<Gallery
    data={[
      {
          id: 0,
          image: 'http://lorempixel.com/300/170/animals/',
      },
    ]}
/>

iOS: Invariant Violation on 5+ remote images

Whenever I have more than 4 images I get the following error:

Invariant Violation: [9017,"RCTView",191,{"width":"<>"}] is not usable as a native method argument

This is all the code I have, change the length to render more/fewer images:

import React, { Component } from 'react'
import { View } from 'react-native'
import PhotoGallery from 'react-native-photo-gallery';

const length = 4;

export default class Gallery extends Component {
  static defaultProps = {
    data: Array.from(
      { length },
      (v, i) => ({
        id: `image_${i}`,
        image: { uri: `https://dummyimage.com/1500x1500/0ff/ff0.png&text=Image+${i}` },
        thumb: { uri: `https://dummyimage.com/150x150/0ff/ff0.png&text=Image+${i}` },
        // overlay: <Overlay />
      })
    )
  }

  render () {
    return (
      <View style={{ flex: 1 }}>
        <PhotoGallery data={this.props.data} />
      </View>
    )
  }
}

Load dynamic images

Is there a way to load dynamic images? require() needs static images from the assets. In my case I do have an array of file paths pointing to images that just got created by react-native-camera. Any way to do it with uri: ... f.e.?

Regards!

Header bar covered by photo

screen shot 2017-08-17 at 17 00 43
I'm using NativeBase. The view is something like

<Container>
  <Header>
    <Left>
        <Button transparent>
          <Icon name='arrow-back' />
        </Button>
      </Left>
      <Body>
        <Title>Header</Title>
      </Body>
    <Right />
  </Header>
  // <Content>
      <Gallery backgroundColor="transparent" data={data} />
  // </Content>
</Container>

If put in block, the header is shown, but the gallery paginator is pushed to below the bottom of view.
screen shot 2017-08-17 at 17 09 10

Error while clicking on image carousel

I get this error when I try to change images via tapping on the carousel.

image_01 2

Swiping left and right to change images works just fine.

I think this could be fixed by using an arrow function

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.