Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

add topRightView to TopBar for customizing right button on TopBar and zooming photo#20

Closed
ksti wants to merge 35 commits into
halilb:masterfrom
ksti:master
Closed

add topRightView to TopBar for customizing right button on TopBar and zooming photo#20
ksti wants to merge 35 commits into
halilb:masterfrom
ksti:master

Conversation

@ksti

@ksti ksti commented Sep 13, 2016

Copy link
Copy Markdown

add topRightView to TopBar for customizing right button on TopBar
onTopRight is the handler for onPress event

zooming photo used this lib "react-native-transformable-image", but this has a few of conflict on pan gesture when scrolling, because it's implemented by scroll view too! And I made some PR like react-native-view-pager and react-native-gallery for resolving these problems.

Comment thread lib/media/Photo.js
/>
{
transformable ? (
<TransformableImage

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used this lib "react-native-transformable-image", but this has a few of conflict on pan gesture when scrolling, because it's implemented by scroll view too!

@ksti ksti changed the title add topRightView to TopBar for customizing right button on TopBar add topRightView to TopBar for customizing right button on TopBar and zooming photo Sep 14, 2016
const { dataSource, mediaList, useGallery } = this.props;
if (useGallery) {
return (
<Gallery

@ksti ksti Sep 21, 2016

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Gallery.js forked from ldn0x7dc/react-native-gallery which support costuming item for renderPage.

@ksti ksti mentioned this pull request Oct 8, 2016
@7kfpun

7kfpun commented Oct 8, 2016

Copy link
Copy Markdown

Hi @ksti,

I did tried to use it in my project, but I see the following error. Could I assume that your PR is compatible with the original example?

       <PhotoBrowser
          onBack={() => this.backHandler()}
          mediaList={this.props.images}
          initialIndex={this.props.initialIndex}
          displayNavArrows={true}
          displaySelectionButtons={false}
          displayActionButton={true}
          startOnGrid={false}
          enableGrid={true}
          onActionButton={(media, index) => this.onShare(media, index)}
          itemPerRow={Device.isTablet ? 8 : 4}
        />

https://github.com/7kfpun/PhotosReactNative/blob/master/app/photo-browser.js#L97-L108

simulator screen shot 8 oct 2016 11 26 27 am

@ksti

ksti commented Oct 8, 2016

Copy link
Copy Markdown
Author

@7kfpun thanks for letting me know this. Now you can 'npm update' for the latest commit.
And you will like to zooming photo by adding props 'useGallery={true}' to 'PhotoBrowser' witch should look like:

<PhotoBrowser
        onBack={navigator.pop}
        mediaList={media}
        initialIndex={initialIndex}
        displayNavArrows={displayNavArrows}
        displaySelectionButtons={displaySelectionButtons}
        displayActionButton={displayActionButton}
        startOnGrid={startOnGrid}
        enableGrid={enableGrid}
        useCircleProgress
        useGallery={true}
        onSelectionChanged={this._onSelectionChanged}
        onActionButton={this._onActionButton}
        onTopRight={() => console.log('on top right click')}
        topRightView={this._renderTopRightView()}
        topRightStyle={{overflow: 'hidden'}}
      />

you can have a look at the usage:https://github.com/ksti/react-native-photo-browser
Thanks again:)Good luck:)

@7kfpun

7kfpun commented Oct 8, 2016

Copy link
Copy Markdown

Ok! it works, on Android and iOS. Thanks @ksti !
Could refer to my example as well and will be published in both stores soon.
https://github.com/7kfpun/PhotosReactNative

@florianbepunkt

florianbepunkt commented Dec 9, 2016

Copy link
Copy Markdown

@ksti I would like to try your PR. but whenever I tap one of the examples in the list I get no component found fir view with name "ARTSurfaceView

Can you help? Haven't found any additional dependencies in your example's package.json

EDIT: Never mind… it has to do with the progress indicator. Maybe you can add a hint in your docs. Also in your example the urls need to be https for iOS or you get an unsecure connection error on current iOS. Impressive work btw 👍

EDIT EDIT: Noticed some sort of bug. When you specify a thumb, then no image is shown at all (using your example project). removing the thumb and it works again.

@ksti

ksti commented Dec 9, 2016

Copy link
Copy Markdown
Author

@florianbepunkt Ok, thanks, I will check it soon.

@ksti

ksti commented Dec 12, 2016

Copy link
Copy Markdown
Author

@florianbepunkt fixed some bugs on rn0.39 and updated the example, wish you like it :)

@richardgirges

Copy link
Copy Markdown

Eagerly awaiting this merge! :)

@halilb

halilb commented Apr 13, 2017

Copy link
Copy Markdown
Owner

Hey @ksti ! Thanks a lot for your time and contributions.

I was busy for maintaining this repo for a while and couldn't review your PRs before. So sorry about that. I think this PR has gotten really huge due to my fault. I'm going to checkout your fork and we can discuss if we could merge your fork over this one.

@XadillaX

Copy link
Copy Markdown
Contributor

I am looking forward to this PR.

@ngandhy

ngandhy commented Jul 25, 2017

Copy link
Copy Markdown
Contributor

any update on this?

@spacegraym3

Copy link
Copy Markdown
Contributor

Bump

@niocncn

niocncn commented Sep 23, 2017

Copy link
Copy Markdown

any updates?

@haimyyy

haimyyy commented Nov 20, 2017

Copy link
Copy Markdown

+1 for this PR

@ducpt2

ducpt2 commented Nov 25, 2017

Copy link
Copy Markdown

+1 for zoom photo.

@jothikannan

Copy link
Copy Markdown

Is this #PR merged or not? It's almost year.

@halilb

halilb commented Dec 27, 2018

Copy link
Copy Markdown
Owner

The diff between the project and this PR have gone huge due to my inability to respond this PR in time. I'm sorry about that.

I just created a separate issue for building zoom support: #89. I think we should use some other library for zooming, and https://github.com/ascoders/react-native-image-viewer looks like a good candidate. Contributions are greatly appreciated.

@halilb halilb closed this Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.