[BottomAppBar] Eager padding setting
See original GitHub issueDescription: After updates to newest versions throughout Google’s portfolio I’m encountering issue which regards consuming insets. Since the widget applies padding to itself to counteract the window’s navigation and status areas’ size taken on the screen it does so in a very weird way.
If I’m consuming the insets, the padding is implicitly set to 0 by the widget - initialPadding
being 0 (incorrectly) to which is added 0 as remainder of the consumed insets (correctly).
When I’m not consuming any insets, the padding is set to 192 by the widget - initialPadding
being 96 (incorrectly) to which is added 96 as remainder of consumed insets (correctly).
I’d speculate that this issue is partly caused by upstream libraries (such as core
or appcompat
) which might’ve altered the logic behind the OnApplyWindowInsetsListener
and its respective callers.
Expected behavior:
The BAB respects the initial padding set by other sources and peeks the remainder of systemWindowInsets
and adds it to current padding if explicitly called for.
Source code:
<style name="ThemeFoundation" parent="Theme.MaterialComponents.NoActionBar">
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
* any BAB in activity’s root layout is having this issue, so omitted for brevity
Android API version: 28,29 - possibly any other as well
Material Library version: 1.1.0-alpha10
Device: Emulator, OnePlus 6T
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
That listener modifes padding at their own but I misread your topic, sorry
Have you tried this code to cancel applywindowinsets? (bottomBar to your BottomAppBarLayout)
Maybe simirar issue with me #564