Open szlezak opened 8 years ago
@szlezak ability to include views inside PhotoView is neither documented nor possible at this moment.
This feature doesn't work now mostly because on Android side the library uses a custom component that doesn't support this behaviour. But the workaround is possible, of course, and PRs are welcome.
Thank's for your quick answer.
@alwx do you have any tips for workaround?
@lenkavon 1) try to wrap it in another view 2) add position=relative 3) add one more view to your root view and set the position of it manually
it should help, but I haven't tested it
This works:
<View>
<PhotoView
style={styles.image}
source={source}
resizeMode={'contain'}
minimumZoomScale={1}
maximumZoomScale={3}
androidScaleType="center"
/>
<View style={{ position: 'absolute' }}>
<Text>Hello</Text>
</View>
</View>
I trying to put some components inside of the PhotoView.
It works fine on IOS but on Android I getting an error.
com.reactnative.photoview.PhotoView cannot be cast to android.view.ViewGroup