From 64d88c5ad8cfe9ab1dd00a578daf1c89e023ec17 Mon Sep 17 00:00:00 2001 From: Mayank Singhal Date: Wed, 16 Sep 2026 11:37:29 +0530 Subject: [PATCH] Fix: Crop area sits under the system bars on edge-to-edge CropImageView fills the whole window, and for an app targeting API 35+ the content view is the whole window too, so the action bar draws over the top of the crop area and the navigation bar over the bottom. Portrait usually hides it, because the image is width-limited there and centres into the vertical slack; in landscape the crop window is height-limited, reaches both edges, and puts its top corner handles under the toolbar with the bottom pair under the navigation bar, where they cannot be dragged. fitsSystemWindows makes the view consume the insets ActionBarOverlayLayout already dispatches to it, the action bar's height included. It is a no-op before edge-to-edge, where the decor fits system windows itself and there is no inset left to consume, so older apps are unaffected. --- CHANGELOG.md | 2 ++ cropper/src/main/res/layout/crop_image_activity.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17ecb3e6..ad11289c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ Version 4.8.0 *(In development)* -------------------------------- +- Fix: Crop area no longer sits under the action bar and the navigation bar on edge-to-edge (Android 15+, targetSdk 35+) ([msinghal34](https://github.com/msinghal34)) + Version 4.7.0 *(2025-11-27)* ---------------------------- diff --git a/cropper/src/main/res/layout/crop_image_activity.xml b/cropper/src/main/res/layout/crop_image_activity.xml index cebe505f..b5bca11b 100644 --- a/cropper/src/main/res/layout/crop_image_activity.xml +++ b/cropper/src/main/res/layout/crop_image_activity.xml @@ -4,4 +4,5 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" + android:fitsSystemWindows="true" />