Yalantis / uCrop

Image Cropping Library for Android
https://yalantis.com/blog/introducing-ucrop-our-own-image-cropping-library-for-android/
11.81k stars 2.14k forks source link

BUG: Android 15 edge-to-edge not supported #913

Open Ekalips opened 3 months ago

Ekalips commented 3 months ago

With the recently announced change in Android 15 all apps will have to support edge to edge properly. Upon testing how the app behaves when edge-to-edge is on (and nav/status bar colours are set to transparent) I found out that uCrop doesn't actually handle system bar overlays.

I'm attaching a screenshot of control elements and toolbar not being inset correctly. Screenshot_1713517959

Ekalips commented 3 months ago

Screenshot_1713518091 It's obviously worse with 2-3 button nav

qeepcologne commented 2 days ago

the top navigation (close and checkmark) is not clickable when build for and running on android 15 (collision with time and network status). Workaround for us is to add back the title, hide the the app name in title and set back the backgrond color.

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

<!-- force add back app bar via title via theme override -->
<style name="Ecift.CropTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowNoTitle">false</item>
    <item name="android:windowTitleStyle">@style/CropTitleStyle</item>
    <item name="android:windowTitleBackgroundStyle">@style/CropTitleStyleBg</item>
</style>

<!-- hide text in app bar (otherwise app name is shown) -->
<style name="CropTitleStyle">
    <item name="android:textColor">@android:color/transparent</item>
</style>

<!-- set background color of app bar -->
<style name="CropTitleStyleBg">
    <item name="android:background">#8b0000</item>
</style>