Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 50077dda4e9d32caa081fa9dcf71126ad255bdec
Author: Max Alfonso-Ying <maxying@google.com>
Date: Tue May 02 20:35:20 2023
Fix NavigationBar layout in edge cases
Old behavior: Icon was a fixed distance from the top.
Label was a fixed distance from the bottom.
New behavior: Icon and label are now grouped together as
one unit, which is positioned in the center.
For the standard nav bar, this is a no-op. But this now fixes
the case when height is smaller than expected or font size is
larger than expected.
Bug: b/275546660 , b/272336962
Test: updated NavigationBarTest, NavigationBarScreenshotTest
Change-Id: I72d6bed7fb4e05392c1e9e964d7d3798e76a71ba
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/NavigationBarScreenshotTest.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/NavigationBarTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/NavigationBar.kt
https://android-review.googlesource.com/2576690
Branch: androidx-main
commit 50077dda4e9d32caa081fa9dcf71126ad255bdec
Author: Max Alfonso-Ying <maxying@google.com>
Date: Tue May 02 20:35:20 2023
Fix NavigationBar layout in edge cases
Old behavior: Icon was a fixed distance from the top.
Label was a fixed distance from the bottom.
New behavior: Icon and label are now grouped together as
one unit, which is positioned in the center.
For the standard nav bar, this is a no-op. But this now fixes
the case when height is smaller than expected or font size is
larger than expected.
Bug:
Test: updated NavigationBarTest, NavigationBarScreenshotTest
Change-Id: I72d6bed7fb4e05392c1e9e964d7d3798e76a71ba
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/NavigationBarScreenshotTest.kt
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/NavigationBarTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/NavigationBar.kt
Description
Currently if the same InteractionState is added in two places that both add the same
Interaction
(such asModifier.clickable
), both components will remove each other'sInteraction
. Instead we should ensure that both producers must remove their state before theInteraction
is removed from theInteractionState
.