react-native-image-crop-picker icon indicating copy to clipboard operation
react-native-image-crop-picker copied to clipboard

overlapping issue

Open SKHRAPP opened this issue 9 months ago • 20 comments

The cropping screen is overlapping on the status bar of the device. This issue is faced in some Android devices. The screenshot is below.

Image

SKHRAPP avatar Mar 25 '25 07:03 SKHRAPP

I'm having the same issue

elkinjosetm avatar Mar 27 '25 14:03 elkinjosetm

i am also having same issue, any solution ?

murari-actxion avatar Mar 27 '25 14:03 murari-actxion

There is workaround on another issue https://github.com/ivpusic/react-native-image-crop-picker/issues/2102

elkinjosetm avatar Mar 27 '25 14:03 elkinjosetm

I'm having issues too, and the workaround sadly didn't work for me:/

AnthonyJamez12 avatar Mar 27 '25 23:03 AnthonyJamez12

The one that worked for me was the patch mentioned, I created a patch with those modifications and it was working as expected

elkinjosetm avatar Mar 28 '25 00:03 elkinjosetm

Oh really?!? Could I use your patch? I saw mozzius had one too. But I never really worked with patches. Would I jjust npm install your package of the patch?

AnthonyJamez12 avatar Mar 28 '25 00:03 AnthonyJamez12

@AnthonyJamez12 patch worked for me also , let me know if you need help.

murari-actxion avatar Mar 28 '25 19:03 murari-actxion

@AnthonyJamez12 we use pnpm in our project, and it comes with a feature to patch a dependency, but if you use npm directly, there is dependency that you can setup in your project that will let you patch dependencies.

Yarn also has a patch functionality

elkinjosetm avatar Mar 28 '25 23:03 elkinjosetm

Thank you @murari-actxion! The patch will be on hold for a while until I can get around to it, but if I need any help I'll let you know.

AnthonyJamez12 avatar Mar 29 '25 00:03 AnthonyJamez12

@elkinjosetm That's super clutch, I've seen that around but never really looked to far into it, I apprecieate the insight. Thanks a lot!

AnthonyJamez12 avatar Mar 29 '25 00:03 AnthonyJamez12

@saucekantrol looks like i am not able to access it on my mac. Image

murari-actxion avatar Apr 20 '25 22:04 murari-actxion

I finally got around to fixing this.

Here’s what worked for me:

In AndroidManifest.xml:

<activity
    android:name="com.yalantis.ucrop.UCropActivity"
    android:screenOrientation="nosensor"
    android:windowLayoutInDisplayCutoutMode="never"
    android:theme="@style/Ecift.CropTheme"
    tools:replace="android:theme" />

In res/values/styles.xml:

<style name="Ecift.CropTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="colorPrimary">#000000</item>
    <item name="colorAccent">#FF4081</item>
    <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>

These changes fixed the issue for me. Hope this helps someone else!

AnthonyJamez12 avatar Jun 16 '25 00:06 AnthonyJamez12

I have changes native modules this is works for me

<activity
    android:name="com.yalantis.ucrop.UCropActivity"
    android:theme="@style/Ecift.CropTheme" />

in res/values/styles.xml

<style name="Ecift.CropTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="colorPrimary">#000000</item>
    <item name="colorAccent">#FF4081</item>
    <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>

SureshVaishnnav avatar Jun 25 '25 10:06 SureshVaishnnav

Made changes in Go to node module then find the cropper Library move that android folder and make these changes do not made changes in our android menifist made changes in Library Android folder

SureshVaishnnav avatar Jun 26 '25 17:06 SureshVaishnnav

I have changes native modules this is works for me

<activity
    android:name="com.yalantis.ucrop.UCropActivity"
    android:theme="@style/Ecift.CropTheme" />

in res/values/styles.xml

<style name="Ecift.CropTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="colorPrimary">#000000</item>
    <item name="colorAccent">#FF4081</item>
    <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>

I have followed the same but still not working the overlapp issue still persist

FardeenNiyaziHM avatar Jul 08 '25 11:07 FardeenNiyaziHM

@FardeenNiyaziHM Made changes in Go to node module, then find the cropper Library Move the android folder, and make these changes Do not make changes in our android manifest Make changes inthe Library Android folder

SureshVaishnnav avatar Jul 08 '25 11:07 SureshVaishnnav

@FardeenNiyaziHM Made changes in Go to node module, then find the cropper Library Move the android folder, and make these changes Do not make changes in our android manifest Make changes inthe Library Android folder

@SureshVaishnnav I have made changes in the android folder of library and added the patch did not work out

Using library version [email protected]

FardeenNiyaziHM avatar Jul 08 '25 11:07 FardeenNiyaziHM

@RameshTigeen did you find any workaround If so, please share

FardeenNiyaziHM avatar Jul 08 '25 11:07 FardeenNiyaziHM

@FardeenNiyaziHM

If your app targets Android 16 (API level 36) and is running on an Android 15 device, R.attr#windowOptOutEdgeToEdgeEnforcement continues to work. If your app targets Android 16 (API level 36) and is running on an Android 16 device, R.attr#windowOptOutEdgeToEdgeEnforcement is disabled.

So I added below style to UCropActivity, and it's working for me <item name="android:windowTranslucentStatus">false</item> <item name="android:windowTranslucentNavigation">false</item> <item name="android:fitsSystemWindows">true</item> <item name="android:statusBarColor">#FFFFFF</item> <!-- light background --> <item name="android:navigationBarColor">#FFFFFF</item> <item name="android:windowLightStatusBar">true</item> <!-- dark icons/text --> <item name="android:windowLightNavigationBar">true</item>

swathycsv avatar Jul 16 '25 06:07 swathycsv

in android styles

   <style name="UCropActivityInsetFix" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:fitsSystemWindows">true</item>
    </style>

In android

<activity
            tools:replace="android:theme"
            android:name="com.yalantis.ucrop.UCropActivity"
            android:theme="@style/UCropActivityInsetFix"/>

it will resolve the issue of image crop picker

devalphaklick avatar Oct 01 '25 09:10 devalphaklick