Skip to content

Fix: Crop area sits under the system bars on edge-to-edge - #705

Open
msinghal34 wants to merge 1 commit into
CanHub:mainfrom
msinghal34:msinghal34/crop-area-under-system-bars
Open

msinghal34 wants to merge 1 commit into
CanHub:mainfrom
msinghal34:msinghal34/crop-area-under-system-bars

Conversation

@msinghal34

Copy link
Copy Markdown

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.

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

Successfully merging this pull request may close these issues.

1 participant