Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ui over flow Issue with android 15 device #346

Open
thilinaktreinetic opened this issue Jan 3, 2025 · 6 comments
Open

Ui over flow Issue with android 15 device #346

thilinaktreinetic opened this issue Jan 3, 2025 · 6 comments

Comments

@thilinaktreinetic
Copy link

thilinaktreinetic commented Jan 3, 2025

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
}
}

@shurtarte39
Copy link

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

@surajsahijwani
Copy link

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

@stoicamark
Copy link

Same here

@atuldhanuka
Copy link

same issue with Google Pixel 8

@Catlandor
Copy link

Catlandor commented Mar 17, 2025

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.

@Seoras
Copy link

Seoras commented Mar 21, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants