uCrop icon indicating copy to clipboard operation
uCrop copied to clipboard

BUG: Android 15 edge-to-edge not supported

Open Ekalips opened this issue 10 months ago • 3 comments

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 avatar Apr 19 '24 09:04 Ekalips

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

Ekalips avatar Apr 19 '24 09:04 Ekalips

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"/>

values/style.xml

    <style name="Ecift.CropTheme" parent="Theme.AppCompat.Light.NoActionBar"/>

values-v35/styles.xml

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

qeepcologne avatar Jul 18 '24 08:07 qeepcologne

or overwrite in v35/styles.xml

<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>

until edge-to-edge is supported

qeepcologne avatar Aug 19 '24 08:08 qeepcologne