uCrop
uCrop copied to clipboard
BUG: Android 15 edge-to-edge not supported
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.
It's obviously worse with 2-3 button nav
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>
or overwrite in v35/styles.xml
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
until edge-to-edge is supported