Open admc opened 8 years ago
@admc Sorry to say that I cannot reproduce the error above with same react-native version. But this could be a similar problem with the one mentioned in the pull request. Pls try editting your Gallery.js in your node_modules folder (follow the pull request, just some lines changed) and see if it works.
It did render more of a matrix of images, however I still receive the same error unfortunately. I wish I knew better how to help debug this issue :(
@admc I'm looking into it. Problem is I can not reproduce this error, so it's troublesome. If you are not testing using the Demo project, maybe you could post more code here. It may help~
I am having the same issue
The issue appears only on Android if the Gallery has more than 50 images, setting initialPage to > 11 will always lead to show the image #11 and scrolling will crash the all with the following error:
undefined is not an object (evaluating '_this2.getCurrentImageTransformer().onResponderGrant')
onStart
Gallery.js:112
activeImageResponder
Gallery.js:146
onResponderGrant
Gallery.js:61
onResponderGrant
createResponder.js:189
executeDirectDispatch
EventPluginUtils.js:176
setResponderAndExtractTransfer
ResponderEventPlugin.js:344
extractEvents
ResponderEventPlugin.js:444
extractEvents
EventPluginHub.js:196
handleTopLevel
ReactEventEmitterMixin.js:28
<unknown>
ReactNativeEventEmitter.js:125
perform
Transaction.js:138
batchedUpdates
ReactDefaultBatchingStrategy.js:63
batchedUpdates
ReactUpdates.js:98
_receiveRootNodeIDEvent
ReactNativeEventEmitter.js:124
receiveTouches
ReactNativeEventEmitter.js:186
__callFunction
MessageQueue.js:228
<unknown>
MessageQueue.js:105
guard
MessageQueue.js:44
callFunctionReturnFlushedQueue
MessageQueue.js:104
Got to find a solution for this:
This is related to a bug in the ListView in ViewPager where ListView initialListSize={initialListSize} should be set to the number of images in your Gallery.
check here for full solution
First image in gallery displays correctly, clicking on it yields the following, tried older versions, and different images, wrapping it in a View, etc and nothing seems to make a difference. Any ideas?
render() { return (
<Gallery style={{flex: 1, backgroundColor: 'black'}} images={[ 'http://p10.qhimg.com/t019e9cf51692f735be.jpg', 'http://ww2.sinaimg.cn/mw690/714a59a7tw1dxqkkg0cwlj.jpg', 'http://www.bz55.com/uploads/allimg/150122/139-150122145421.jpg' ]} /> ) } }