jeanpan / react-native-camera-roll-picker

📷 A React Native component providing images selection from camera roll
https://www.npmjs.com/package/react-native-camera-roll-picker
MIT License
422 stars 176 forks source link

suggestions #3

Open FaridSafi opened 8 years ago

FaridSafi commented 8 years ago

Hello, great component! I am using it in a project and I suggest the following features:

I will try to prepare a pull request

superandrew213 commented 8 years ago

What about #4 for custom selected image marker?

jeanpan commented 8 years ago

@superandrew213 Thanks for the PR, will merge it after checking the functionality.

jeanpan commented 8 years ago

4 : Custom circle-check image has been merged.

superandrew213 commented 8 years ago

Great!

superandrew213 commented 8 years ago

How about we use ListView to improve performance? Or even better this react-native-sglistview.

If you scroll past 500 photos memory is hitting +1.1gb

st0ffern commented 8 years ago

move it to ES6 syntax

jeanpan commented 8 years ago

@superandrew213. Ok, I will try to use ListView instead in my free time. Thanks for the suggestion.

jiachaosun commented 8 years ago

I try to use ListView,but not easy.I don't know how to recall the renderRow method to show "selectedMarker" component,because when i call setState method the ListView only rerender by render().The renderRow props function not recall.

st0ffern commented 8 years ago

@jiachaosun I have allready put together a SGListView here https://github.com/jeanpan/react-native-camera-roll-picker/pull/7

if you want to test it right away try this until its merged: npm i -S github:stoffern/react-native-camera-roll-picker

jeanpan commented 8 years ago

@FaridSafi : loading indicator has been added in the latest version. please check it !

superandrew213 commented 8 years ago

Video support would be nice. Any ideas how to go about it? CameraRoll only returns photos.

st0ffern commented 8 years ago

@superandrew213 assetType : The asset type, one of 'Photos', 'Videos' or 'All'. (Default: Photos)

superandrew213 commented 8 years ago

Lol mixed it up with this react-native-image-crop-picker

st0ffern commented 8 years ago

ah :+1: then i would use this picker and my cropper :) https://github.com/stoffern/react-native-image-cropper

superandrew213 commented 8 years ago

yes I'm playing around with both options testing which one performs the best

st0ffern commented 8 years ago

@superandrew213 i know there is a bug with the pan to move in my cropper. I have fixed it just not commited the update yet :smiley:

st0ffern commented 8 years ago

@jeanpan not to be a copycat or anything but after a view of the code i found out that selecting items would trigger a complete rerender of the SGListView. With that in mind, and the batchSize added from your side and my request of having loading spinners for all images i started to a total rewrite of the component.

https://github.com/stoffern/react-native-mediapicker Please try it and see if you would like to merge it? It has quite a performance boost as selecting items only trigger render of the item itself.

jeanpan commented 8 years ago

@stoffern thanks for your suggestion. I will prepare a commit for fixing the problem of rerender SGListView.

shireen commented 7 years ago

How do I use the newly added loading indicator?

BonnieMilian commented 6 years ago

Dinamic ImageItem ReSize when the Layout Orientation change.