Join Slack
Powered by
Why `testTag` doesn’t override like `background` ?...
# compose
t
theapache64
12/12/2023, 3:26 PM
Why
testTag
doesn’t override like
background
? Here it picked the first testTag but second background color 🤔
👀 1
b
Ben Trengrove [G]
12/12/2023, 9:54 PM
There can only be one test tag because of the way it maps to the semantics tree, and it always takes the parent one when merging the semantics properties, which in this case would be the first modifier.
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]roidx/compose/ui/semantics/SemanticsProperties.kt;l=190;bpv=0
Ben Trengrove [G]
12/12/2023, 9:54 PM
Also, it hasn't overridden the background color, it's just drawn twice at a guess and you can't see the green
➕ 1
5
Views
Open in Slack
Previous
Next