This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Model Android keyboard height as view inset#4447
Merged
cbracken merged 1 commit intoflutter:masterfrom Dec 12, 2017
cbracken:android-insets
Merged
Model Android keyboard height as view inset#4447cbracken merged 1 commit intoflutter:masterfrom cbracken:android-insets
cbracken merged 1 commit intoflutter:masterfrom
cbracken:android-insets
Conversation
xster
approved these changes
Dec 12, 2017
| @Override | ||
| public final WindowInsets onApplyWindowInsets(WindowInsets insets) { | ||
| // On Android, we do not differentiate between 'safe areas' and view insets. | ||
| // Status bar, left/right system insets are padding. |
Member
There was a problem hiding this comment.
Maybe just as a mini hint for readers, mention top left right are paddings because they're partial obstructions, bottom is generally a full obstruction, thus a view inset.
Member
Author
There was a problem hiding this comment.
Done. Hinted at rationale: padding is for view content that should sit 'under' the system chrome; insets are for view content where system chrome should effectively 'shrink' the content area.
Model top and side system insets as padding and bottom (keyboard) as a view inset. This avoids applying system insets twice (once as an inset, once as padding).
cbracken
added a commit
to cbracken/flutter
that referenced
this pull request
Dec 12, 2017
cbracken
added a commit
to flutter/flutter
that referenced
this pull request
Dec 12, 2017
DaveShuckerow
pushed a commit
to DaveShuckerow/flutter
that referenced
this pull request
May 14, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Model top and side system insets as padding and bottom (keyboard) as a
view inset. This avoids applying system insets twice (once as an inset,
once as padding).
Engine side fix to flutter/flutter#13475