Fixed
Status Update
Comments
cl...@google.com <cl...@google.com> #2
This is supported by how content lambdas work in Compose.
Button {
Row {
Icon()
Spacer()
Text()
}
}
We should provide an @sample that showcases this though, so repurposing this bug for that :)
an...@google.com <an...@google.com> #3
and button's slot should be a row I guess
ka...@google.com <ka...@google.com> #4
I took the variable name a little too literally `text: @Composable () -> Unit` and failed to make the connection that any composable can be provided. Thanks for the clarification.
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 038a5eba68197ebfd3c07ae01d5c21fa827b16bb
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Mon Jun 22 19:29:07 2020
Make Button's content slot to be Row
Plus add a sample how to make Button with icon and text
Relnote: Button's content slot now behaves as Row (useful when you need to have an icon with a text, see samples on Button how to write it)
Test: new nests
Fixes: 158677863
Change-Id: I0ff10603b1a290a8f9b0c27988008572ecf0927a
M ui/ui-material/api/0.1.0-dev15.txt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_0.1.0-dev15.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos/ButtonDemo.kt
M ui/ui-material/samples/src/main/java/androidx/ui/material/samples/ButtonSamples.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/Button.kt
M ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/inspector/LayoutInspectorTreeTest.kt
https://android-review.googlesource.com/1346442
Branch: androidx-master-dev
commit 038a5eba68197ebfd3c07ae01d5c21fa827b16bb
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Mon Jun 22 19:29:07 2020
Make Button's content slot to be Row
Plus add a sample how to make Button with icon and text
Relnote: Button's content slot now behaves as Row (useful when you need to have an icon with a text, see samples on Button how to write it)
Test: new nests
Fixes: 158677863
Change-Id: I0ff10603b1a290a8f9b0c27988008572ecf0927a
M ui/ui-material/api/0.1.0-dev15.txt
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_0.1.0-dev15.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos/ButtonDemo.kt
M ui/ui-material/samples/src/main/java/androidx/ui/material/samples/ButtonSamples.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/Button.kt
M ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/inspector/LayoutInspectorTreeTest.kt
Description
Version used: dev-12
Devices/Android versions reproduced on: n/a
The material button component should support icons next to text.