Cannot Click X and ✓ Buttons at the Top When Cropping in the Latest Version
Cannot Click X and ✓ Buttons at the Top When Cropping on Android with the Latest Versions of React Native and react-native-crop-picker
Same for me. Should respect the safe areas.
just extend safe area from main activity
tôi cũng gặp phải tình trạng như của bạn, tôi vẫn chưa có cách giải quyết, bạn đã có giải pháp cho trường hợp này chưa
Still seeing this, rendering this module completely unusable.
i am facing the same issue
Same issue for me as well
I faced similar issue as well at my latest RN project that is targeting Android SDK 35. I think this should be related to the fact that Android is forcing app targeting SDK 35 to be always edge-to-edge.
After some tinkering, the simplest way i can find to avoid this is to show the cropping activity as a floating window which will never show content under status bar/cutouts. I did so by changing the activity style for com.yalantis.ucrop.UCropActivity (from Theme.AppCompat.Light.NoActionBar) to @style/UCropTheme
AndroidManifest.xml
...
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:theme="@style/UCropTheme" />
...
and add the style file as following: value/styles.xml
<resources>
<style name="UCropTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowIsFloating">true</item>
<item name="android:windowMinWidthMajor">100%</item>
<item name="android:windowMinWidthMinor">100%</item>
<item name="android:windowContentOverlay">@null</item>
</style>
</resources>
I include a patch file doing these for your convenience. So far, I am only able to test that it works for my one Android 15 phone but not other phone/Android versions, not sure if it will have any negative impact, especially on older versions of Android. Maybe someone can help to test it out?
I faced similar issue as well at my latest RN project that is targeting Android SDK 35. I think this should be related to the fact that Android is forcing app targeting SDK 35 to be always edge-to-edge.
After some tinkering, the simplest way i can find to avoid this is to show the cropping activity as a
floating windowwhich will never show content under status bar/cutouts. I did so by changing the activity style forcom.yalantis.ucrop.UCropActivity(fromTheme.AppCompat.Light.NoActionBar) to@style/UCropTheme
AndroidManifest.xml... <activity android:name="com.yalantis.ucrop.UCropActivity" android:theme="@style/UCropTheme" /> ...and add the style file as following:
value/styles.xml<resources> <style name="UCropTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowIsFloating">true</item> <item name="android:windowMinWidthMajor">100%</item> <item name="android:windowMinWidthMinor">100%</item> <item name="android:windowContentOverlay">@null</item> </style> </resources>I include a patch file doing these for your convenience. So far, I am only able to test that it works for my one Android 15 phone but not other phone/Android versions, not sure if it will have any negative impact, especially on older versions of Android. Maybe someone can help to test it out?
Thanks @ahlun , your patch works correctly. Maybe you could create a PR with this.
I faced similar issue as well at my latest RN project that is targeting Android SDK 35. I think this should be related to the fact that Android is forcing app targeting SDK 35 to be always edge-to-edge.
After some tinkering, the simplest way i can find to avoid this is to show the cropping activity as a
floating windowwhich will never show content under status bar/cutouts. I did so by changing the activity style forcom.yalantis.ucrop.UCropActivity(fromTheme.AppCompat.Light.NoActionBar) to@style/UCropTheme
AndroidManifest.xml... <activity android:name="com.yalantis.ucrop.UCropActivity" android:theme="@style/UCropTheme" /> ...and add the style file as following:
value/styles.xml<resources> <style name="UCropTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowIsFloating">true</item> <item name="android:windowMinWidthMajor">100%</item> <item name="android:windowMinWidthMinor">100%</item> <item name="android:windowContentOverlay">@null</item> </style> </resources>I include a patch file doing these for your convenience. So far, I am only able to test that it works for my one Android 15 phone but not other phone/Android versions, not sure if it will have any negative impact, especially on older versions of Android. Maybe someone can help to test it out?
thank you very much your patch works correctly.
Same issue latest React Native v0.79 - Android only
I faced similar issue as well at my latest RN project that is targeting Android SDK 35. I think this should be related to the fact that Android is forcing app targeting SDK 35 to be always edge-to-edge.
After some tinkering, the simplest way i can find to avoid this is to show the cropping activity as a
floating windowwhich will never show content under status bar/cutouts. I did so by changing the activity style forcom.yalantis.ucrop.UCropActivity(fromTheme.AppCompat.Light.NoActionBar) to@style/UCropTheme
AndroidManifest.xml... <activity android:name="com.yalantis.ucrop.UCropActivity" android:theme="@style/UCropTheme" /> ...and add the style file as following:
value/styles.xml<resources> <style name="UCropTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowIsFloating">true</item> <item name="android:windowMinWidthMajor">100%</item> <item name="android:windowMinWidthMinor">100%</item> <item name="android:windowContentOverlay">@null</item> </style> </resources>I include a patch file doing these for your convenience. So far, I am only able to test that it works for my one Android 15 phone but not other phone/Android versions, not sure if it will have any negative impact, especially on older versions of Android. Maybe someone can help to test it out?
Thanks, @ahlun — your patch works perfectly!
I encountered a strange issue where the library wasn't working on the Nothing Phone 1 running Android 15. However, it worked fine on the OnePlus 8 (Android 11) and the Docomo F-52A (Android 12).
After applying your patch, the library now works correctly across all devices.
facing the same issue in new android devices
I faced similar issue as well at my latest RN project that is targeting Android SDK 35. I think this should be related to the fact that Android is forcing app targeting SDK 35 to be always edge-to-edge.
After some tinkering, the simplest way i can find to avoid this is to show the cropping activity as a
floating windowwhich will never show content under status bar/cutouts. I did so by changing the activity style forcom.yalantis.ucrop.UCropActivity(fromTheme.AppCompat.Light.NoActionBar) to@style/UCropTheme
AndroidManifest.xml... <activity android:name="com.yalantis.ucrop.UCropActivity" android:theme="@style/UCropTheme" /> ...and add the style file as following:
value/styles.xml<resources> <style name="UCropTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowIsFloating">true</item> <item name="android:windowMinWidthMajor">100%</item> <item name="android:windowMinWidthMinor">100%</item> <item name="android:windowContentOverlay">@null</item> </style> </resources>I include a patch file doing these for your convenience. So far, I am only able to test that it works for my one Android 15 phone but not other phone/Android versions, not sure if it will have any negative impact, especially on older versions of Android. Maybe someone can help to test it out?
Thanks @ahlun, it worked for me