summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceTable.cpp
diff options
context:
space:
mode:
author Caitlin Shkuratov <caitlinshk@google.com> 2025-03-12 19:25:22 +0000
committer Caitlin Shkuratov <caitlinshk@google.com> 2025-03-13 06:35:13 -0700
commita765eda7c6a77ff822f1e6f9d15ed082c87b54ef (patch)
treeafd9a07c01629b2ac1a958cf3e324dbf0e99783f /tools/aapt2/ResourceTable.cpp
parentd859311070a0638715e4f455d26260d98ebdb789 (diff)
[SB][Chips] Fix chip sizings, paddings, and visibility.
1. `Expandable` was enforcing a minimum width of 40.dp even if the chip wasn't clickable, which is still too big for the 3-2-1 countdown chip. Now, `Expandable` has a new `defaultMinSize` parameter which can be set to false to not enforce that 40.dp minimum width. 2. ag/32020945 accidentally removed the `.thenIf(isClickable) { Modifier.widthIn(min = minWidth) }` line, which meant that icon-only chips were too small (they should've been 48.dp, but they were only 40.dp) and there was too much spacing between the icon-only chips. 3. We need to hide a chip completely if there isn't enough room for it. That's done via the `.layout {}` modifier. This CL moves that modifier out of the ChipBody composable and into the parent Expandable composable, which ensures we definitely don't show anything. Fixes: 402083504 Bug: 372657935 Flag: com.android.systemui.status_bar_chips_modernization Test: Trigger SysUI screen recording -> verify 3-2-1 countdown chip has small width Test: Trigger 2 chips on a portrait phone -> verify each chip is 48dp wide with minimum padding between Test: Trigger 3 different chips on a portrait phone -> verify the third chip never shows up, not even cropped Test: Verify b/397505143 is still fixed Test: Verify chip -> dialog animation still looks correct Test: General smoke test of the chips, see video in b/402083504 Change-Id: I65e74c472ccd6adcb2c74659a1ceb8ee207d84fd
Diffstat (limited to 'tools/aapt2/ResourceTable.cpp')
0 files changed, 0 insertions, 0 deletions