While tracing some button layout problems, I found...
# compose
l
While tracing some button layout problems, I found
.minimumTouchTargetSize()
was added to Surface. Button should extend to minimum touch target size, but it seems only the Surface (in the
Button.kt
) extended, Row didn't extended. Is this expected behavior?
Result for
Copy code
OutlinedButton(onClick = {}, modifier = Modifier.background(Color.Gray)) { Text("button!") }
It seems
Surface
expands correctly, but
Row
inside does not. Row 1) should fit the size of surface or 2)
.minimumTouchTargetSize()
should be added to Row. See https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]c/commonMain/kotlin/androidx/compose/material/Button.kt;l=122
Workaround: provide
LocalMinimumTouchTargetEnforcement
= false
... which causes TopAppBar to be cut..?