Git Product home page Git Product logo

photo-viewer's People

Contributors

axxag avatar bang88 avatar brycepavey avatar calintamas avatar dependabot[bot] avatar gerharddc avatar hellohublot avatar kashsbd avatar rodolfogs avatar rogchap avatar schonfeld avatar strate avatar vforvasile avatar xxtonglei4334 avatar zhouanbo 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  avatar  avatar

photo-viewer's Issues

Hide status bar

Should hide status bar when a photo is opening and show it back when its dismissed

Opening 2 instances when visible

Hi @BANG88 ,

Thanks for the library, I'm liking it a lot!

When I try it in my project, I observed a weird behavior that the viewer instance is opening 2 instances of itself. Because when I dismiss it using swipe gesture, there's another one in the background showing the same picture. And it then disappear because of the onDismiss function. If I remove the onDismiss function, I'll have to swipe twice to dismiss it.

My code looks roughly like this, I also checked that I only have one in the project:

{/** Pics */ }
<View style={{ flexGrow: 1, marginLeft: 5 + 49 + 5, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', flexWrap: 'wrap', width: 85 * 2 + 5 }}>
  <PhotoView
    visible={this.state.visible}
    data={this.state.photos}
    hideStatusBar={true}
    initial={this.state.initial}
    onDismiss={e => {
      //this.setState({ photos: [], visible: false });
    }}
  />
  {rowData.pics ? rowData.pics.map((pic, idx) => {
    return <TouchableOpacity key={rowID + idx} onPress={() => this.setState({ visible: true, initial: idx, photos: rowData.pics.map(image => { return { source: { uri: image } } }) })}>
        <View style={{ backgroundColor: '#f4f4f4', alignSelf: 'flex-start', marginTop: 10, width: 85, height: 85 }}>
          <CachedImage key={rowData.id} style={{ width: 85, height: 85 }} source={{ uri: pic}} />
        </View>
    </TouchableOpacity>
  }) : null}
</View>

If you could help me with this, it'll be more than appreciated!

Customization

  • attributedCaptionTitle && color
  • attributedCaptionSummary && color
  • attributedCaptionCredit
  • hideStatusBar

IOS only , maybe in the future

  • placeholderImage

Android only

  • backgroundColor
  • swipeToDismiss
  • zooming
  • shareText

Android Studio Project

Hi,

Can this be used just for Android Studio? I'm trying to figure out how to use but the examples is not exactly clear... I'm stuck at understanding how to use MerryPhotoData's variable ReadableMap.

Greatly appreciated any help rendered. Thanks!

iOS: App crashes when trying to save image

The app crashes when I try to save an image.

Steps to reproduce: Click the icon on the right hand corner -> save image -> crashes.

Other actions (e.g. Mail, Copy) seem to work fine.

Btw, this is the best photo-viewer for RN so far!

Update to Android SDK version 26

Hi,

Recently, react-native-maps, as well as a number of packages have updated to android SDK version 26 and Gradle version 3. It seems like this package will not be compatible with them in Android without an upgrade. Could you work on it when you have time?

Thanks for the awesome package!

how to show local image

In a chat app, if I send an image message, the receiver need a remote image, but I just need a local image.

error

不知道现在是不是RN版本的原因,按照步骤根本没法用,IOS一堆错误,好不容解决,一点图片app就奔溃,全部是拷贝的例子.安卓也是,根本接入不进去,好烦躁

"ld: framework not found NYTPhotoViewer" and ld: "framework not found for NYTPhotoViewer architecture x86_64"

Xcode: 9.2
Cocoapods: 1.4.0

Using cocoapods I'll get framework not found for NYTPhotoViewer architecture x86_64 using this pod file:

platform :ios, '9.0'

target 'brandoo' do
  #use_frameworks! (causes issues with react-native-firebase)

  # firebase
  pod 'Firebase/Core'
  pod 'Firebase/Analytics'
  pod 'Firebase/Database'
  pod 'Firebase/Messaging'
  pod 'Firebase/Auth'
  pod 'Firebase/Storage'
  
  #image
  pod 'RSKImageCropper'
  pod 'QBImagePickerController'
  
  # gallery
  #pod 'NYTPhotoViewer' # (tried this one as well)
  pod 'NYTPhotoViewer',:git => 'https://github.com/merryjs/NYTPhotoViewer.git', :branch => 'master'

end

Trying to manually link those frameworks as described gives me ld: framework not found NYTPhotoViewer :
image

Workaround for older gradles

if you use

include ':merryjs-photo-viewer'
project(':merryjs-photo-viewer').projectDir = new File(rootProject.projectDir, 	'../node_modules/@merryjs/photo-viewer/android')

and

    compile project(':merryjs-photo-viewer')

It will work in gradle 2.2.3.

Thanks for writing this library!

Can you open or share the way to customize overlay information.

Hi there,

I'm newbie in RN and I found your library very helpful. But some time I want to have some functionality in bottom of overlay photo view ex: comment, download buttons also only one double tab zoom level...

If you can open some input for overlay view example: header, footer (RN component input as well) of each picture. So I can modify anything in there with your onChange event.

Thank you!

MultiTouchViewPager should be public

Hello, I am unable to build APK when this package included the project.

  • Gradle version: 2.3.3
  • distributionUrl: gradle-3.3-all

Error:

    ...\node_modules\@merryjs\photo-viewer\android\src\main\java\com\stfalcon\frescoimageviewer\MultiTouchViewPager.java:37: 
Error: This class should be public (com.stfalcon.frescoimageviewer.MultiTouchViewPager) [Instantiatable]
                                                                                                                                                                               public MultiTouchViewPager (Context context, AttributeSet attrs) {
       Explanation for issues of type "Instantiatable":
       Activities, services, broadcast receivers etc. registered in the manifest
       file (or for custom views, in a layout file) must be "instantiatable" by
       the system, which means that the class must be public, it must have an
       empty public constructor, and if it's an inner class, it must be a static
       inner class.
    
    1 errors, 0 warnings
    :app:lintVitalRelease FAILED

Thank you.

Adding support for lazy loading more photos

I have an experimental photo app which has hundreds of photos, its not possible for me to bring all of them in first render.

Can we add support for adding more photos dynamically, I see that onNavigateToPhoto was added but has been commented out, any specific reason for this?

Love your library, thanks.

show() is not work

import photoViewer from '@merryjs/photo-viewer'

const photos = [
  {
    url: "https://c1.staticflickr.com/8/7625/16631849053_db25684173_k.jpg",
    title: "Flash End-of-Life",
    summary:
      "Adobe announced its roadmap to stop supporting Flash at the end of 2020. ",
    // must be valid hex color or android will crashes
    titleColor: "#f90000",
    summaryColor: "green"
  },
  {
    url: "https://c1.staticflickr.com/6/5598/14934282524_577a904d2b_k.jpg"
  },
  {
    url: "https://c1.staticflickr.com/8/7596/17021131801_fbd8f2b71a_k.jpg"
  },
  {
    url:
      "https://images.pexels.com/photos/45170/kittens-cat-cat-puppy-rush-45170.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"
  },
  {
    url:
      "https://images.pexels.com/photos/142615/pexels-photo-142615.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"
  },
  {
    url:
      "https://images.pexels.com/photos/82072/cat-82072.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"
  },
  {
    url:
      "https://images.pexels.com/photos/248261/pexels-photo-248261.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb"
  },
    {
      url:'https://media.giphy.com/media/xT39CSUZtc1T1iKgc8/giphy.gif'
    },
    {
      url:'https://media.giphy.com/media/3o6vXWzHtGfMR3XoXu/giphy.gif'
    }
];

// when I click a image, I call
photoViewer.show({
    hideStatusBar: true,
    swipeToDismiss: true,
    zooming: true,
    data: photos,
    initial: 0,
  })

the result is below:

image

image

w/o native dependencies

this looks great, but is it possible to do it without native dependencies? Could see it being useful as part of an Expo app.

Android activity is not found

<activity
        android:name="com.merryjs.PhotoViewer.PhotoViewer.MerryPhotoViewActivity"
        android:theme="@style/Theme.Transparent" />

where is MerryPhotoViewActivity? so that compile is not work

image

Add support for custom pagination / tab / navbar

The module is now have enough functionality, but it seems having a leak of customization supporting. It should be excellent if we can customize pagination , tab bar or nav bar for the photo viewer.

issue : framework not found FLAnimatedImage.

I followed the documentation but I got the error :

Showing Recent Issues
: Directory not found for option '-L/Users/ys/Library/Developer/Xcode/DerivedData/teacher-fzdubxxrijpadnasgarldwyntpzz/Build/Products/Release-iphonesimulator/React'

framework not found FLAnimatedImage.

Showing Recent Issues
: Linker command failed with exit code 1 (use -v to see invocation)

Can I ask for a help with this. @MerryIS
image

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.