react-native-photo-browser icon indicating copy to clipboard operation
react-native-photo-browser copied to clipboard

[Android] The photo doesn't show full screen in landscape mode.

Open 7kfpun opened this issue 9 years ago • 1 comments

The image gallery could not show photo full screen on Android in landscape mode. However, on iOS, it works correctly.

7kfpun avatar May 09 '16 14:05 7kfpun

Thanks for the contribution @7kfpun.

I debugged the code and realised two problems about Dimensions in android. First, didUpdateDimensions event is not fired on android. Second, Dimensions.get('window') is always returning width/height for landscape state. There is a react-native issue about the second problem.

There are 3rd party modules to detect orientation change but they require additional installation steps, and i'm not happy with requiring one of them as a dependency here. I'm not sure how to proceed with this issue.

I'm currently re-rendering every image in full screen mode to make them full screen. Maybe there is a better way to make it right.

halilb avatar May 10 '16 10:05 halilb