ImagePicker icon indicating copy to clipboard operation
ImagePicker copied to clipboard

Ui over flow Issue with android 15 device

Open thilinaktreinetic opened this issue 11 months ago • 17 comments

Capture

Summary

Edit Phot screen overflowed status bar and user cant click correct button

Android version

Android 15

Impacted devices

Google pixel 9

Installation method

gradle

SDK version

 implementation 'com.github.dhaval2404:imagepicker:2.1'

Other information

we can fix it adding this to activity oncreate method add it and update the pluging if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { window.decorView.setOnApplyWindowInsetsListener { v, insets -> val bars = insets.getInsets( WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout() ) v.updatePadding( left = bars.left, top = bars.top, right = bars.right, bottom = bars.bottom ) WindowInsets.CONSUMED } }

thilinaktreinetic avatar Jan 03 '25 04:01 thilinaktreinetic

Im having the same problem, pixel 8 pro with android 15

shurtarte39 avatar Feb 12 '25 21:02 shurtarte39

I am having same issue with Xiaomi device, not able to accept or decline cropped image

surajsahijwani avatar Feb 27 '25 11:02 surajsahijwani

Same here

stoicamark avatar Mar 07 '25 14:03 stoicamark

same issue with Google Pixel 8

atuldhanuka avatar Mar 13 '25 12:03 atuldhanuka

Since this repo seems to be stale: In case someone stumbles upon this thread, I fixed this issue in my fork, see: https://github.com/Catlandor/ImagePicker It's published to Maven Central.

Catlandor avatar Mar 17 '25 08:03 Catlandor

You need to add this to your project manifest:

        <activity
            android:name="com.yalantis.ucrop.UCropActivity"
            tools:node="replace"
            tools:ignore="AppLinkUrlError"
            android:screenOrientation="portrait"
            android:theme="@style/Theme.Ucrop.Custom" />

Then you need to edit your themes.xml (or styles.xml etc) and add:

    <style name="Theme.Ucrop.Custom" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Carry over anything you need from the library's default UCrop style -->
    </style>

and also create a v35 copy of your themes.xml (or whatever) containing:

<style name="Theme.Ucrop.Custom" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Carry over anything you need from the library's default UCrop style -->
        <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
        <!-- Optionally adjust status bar color, toolbar color, etc. -->
    </style>

If that doesn't work let me know, I did make other changes (which didn't work) but maybe they helped in someway I haven't figured out yet.

Seoras avatar Mar 21 '25 01:03 Seoras

@Seoras It works on me. THKs

KirinHorse avatar May 13 '25 08:05 KirinHorse

@Seoras Now it working.. Thanks....

foravnish avatar Jun 25 '25 11:06 foravnish

@Seoras sadly, opting out edge-to-edge enforcement is removed in Android 16

raheemadamboev avatar Jul 07 '25 12:07 raheemadamboev

@Seoras can not access com.yalantis.ucrop.UCropActivity in my project manifest.
<activity android:name="com.yalantis.ucrop.UCropActivity" tools:node="replace" tools:ignore="AppLinkUrlError" android:screenOrientation="portrait" android:theme="@style/Theme.Ucrop.Custom" />

how to add it to my manifest ??

mujeeb01 avatar Jul 23 '25 10:07 mujeeb01

@Seoras can not access com.yalantis.ucrop.UCropActivity in my project manifest.

how to add it to my manifest ?? This library internally uses the uCrop library for image cropping, so use implementation 'com.github.yalantis:ucrop:2.2.10' then try @Seoras 's fix

Image

sarathic avatar Jul 28 '25 11:07 sarathic

@Seoras sadly, opting out edge-to-edge enforcement is removed in Android 16

I've tested on Android 16 and it appears to still work as intended. I'd be surprised if Google removed this opt out option so soon as it'll affect end users more than developers.

Seoras avatar Jul 28 '25 20:07 Seoras

@Seoras sadly, opting out edge-to-edge enforcement is removed in Android 16

I've tested on Android 16 and it appears to still work as intended. I'd be surprised if Google removed this opt out option so soon as it'll affect end users more than developers.

Have you set your appstargetSdk to 36? Opting out edge-to-edge enforcement is removed when targeting 36.

https://developer.android.com/about/versions/16/behavior-changes-16#edge-to-edge

I found this fork of library that is up-to-date and edge-to-edge is handled properly:

https://github.com/Catlandor/ImagePicker

raheemadamboev avatar Jul 29 '25 07:07 raheemadamboev

getting the same issue in android 16 devices

UzaairJamal avatar Sep 09 '25 07:09 UzaairJamal

We need a solution!!! Please, fix

rustamsafarovrs avatar Sep 29 '25 19:09 rustamsafarovrs

I had to fork, and I fixed the issue in my own fork https://github.com/maleeqB/ImagePicker

maleeqB avatar Oct 02 '25 09:10 maleeqB

@maleeqB I really appreciate it — this solution works perfectly on my side as well. Thanks again for your help!

musab021 avatar Nov 25 '25 12:11 musab021