Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Android: Edge-to-Edge Support with Overflow Handling
This PR introduces a flexible edge-to-edge system for Android, allowing views to handle system insets more precisely.
🔧 Features
androidOverflowEdge
(new property)Controls which inset edges should be applied and/or consumed by the view.
androidOverflowInset
(new event)Fired when
androidOverflowEdge
is set todont-apply
. Allows manual handling of the insets.enableEdgeToEdge()
(new method)Enables full edge-to-edge rendering and lets you:
✏️
androidOverflowEdge
Optionsnone
left
/top
/right
/bottom
dont-apply
androidOverflowInset
left-dont-consume
top-dont-consume
right-dont-consume
bottom-dont-consume
all-but-left
all-but-top
all-but-right
all-but-bottom
🧩 Manually Handling Insets with
androidOverflowInset
When
androidOverflowEdge
is set todont-apply
, the view will receive theandroidOverflowInset
event instead of automatically applying insets.This event allows you to inspect, modify, and explicitly consume specific inset sides using the
*Consumed
flags.Example: