Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
Currently facing an issue with the Material 3 library where starting from
1.4.0-alpha06
(and still present inalpha07
) a bug was introduced where the toolbar padding in aScaffold
is displaying an unexpected inset when there is no cutout or any device artifact to justify it.Using a basic example:
Shows no problems in versions
1.4.0-alpha05
and below (including stable1.3.1
).See attached "correct" screenshot where the top bar does not display any extra inset in the Android Studio UI Preview window.
Whereas on versions
1.4.0-alpha06
and above it shows an extra padding on top of the top bar for no reason whatsoever on the Android Studio UI Preview window, see "bug" screenshot.Note: At no point has there ever been any changes to default settings of Android Studio's Preview utility, all it is using is the exact same simple
@Preview
annotation an nothing else.To work around this problem I am forced to revert to a previous library version or manually override every single TopAppBar window insets values to 0.dp, which is just not a reasonable expectation, especially when considering that this shouldn't even be happening on a basic preview window with no cutouts present.
Reading the release notes of
1.4.0-alpha06
the likely culprit lies with the "Added displayCutout to the group of insets that Material components take into account by default, to avoid content overlapping with the display cutout." which, in the case of the examples I provided, makes no sense since it does not have a single cutout configured.