thomas-coldwell / expo-image-editor

A super simple image cropping and rotation tool for Expo that runs on iOS, Android and Web!
164 stars 32 forks source link

Not able to move crop overlay on Android devices. #41

Closed giriprabu closed 3 years ago

giriprabu commented 3 years ago

It is not possible to move or change the size of the crop overlay on Android devices. I tested this on Samsung s20FE and Pixel 3a both running Android 11. Can you please check this issue on your side? The editor is working fine on iOS devices.

mmelilli commented 3 years ago

I confirm it doesn't work on android 11 (i'm testing in a Pixel 3a too)

Svarto commented 3 years ago

Same problem here, anyone found a fix?

giriprabu commented 3 years ago

I forked the expo-image-editor library and changed the library code to fix the issue. I then installed the library directly from the forked git rather than from npm. Hope this helps.

thomas-coldwell commented 3 years ago

Hey folks sorry for the inactivity! This should be fixes in the latest release v1.6.0 now - a bit of a workaround was required - it was an issue with React Navigation and the use of the GestureHandlerRootView we use in the modal - full issue can be read here https://github.com/react-navigation/react-navigation/issues/9757.

In the meantime you will need to import the <ImageEditorView /> component from the library and then place that in a Stack Modal as per the React Navigation docs https://reactnavigation.org/docs/modal/

Hope this helps :)

thomas-coldwell commented 3 years ago

I've updated the docs to reflect this - you can now use it as a regular view (with no modal) using the asView prop. Then you can render this view in whatever you would like e.g. React Native Modal or React Navigation Stack Modal - the latter which will solve the issue you were facing on Android as per my last comment. Hope this helps!