Ash
12/18/2021, 10:52 PMif
statement.
These should both just be Row and each WearOS device doing the correct rendering ...
if (LocalConfiguration.current.isScreenRound) {
CurvedRow(
} else {
Row(
This does not feel like Declarative to me ??? 🤷🏽Ash
12/18/2021, 10:56 PMyschimke
12/19/2021, 6:23 AMMaterial Components that support inner content (text labels, icons, etc.) tend to offer “slots” — generic lambdas that accept composable content — as well as public constants, like size and padding, to support laying out inner content to match Material specifications.Which is why it's four generic lambdas, as opposed to a label as a String, or a TimeTextLabel that builds either, or only leading text. In compose you can make your own custom component that takes a String label and wrap TimeText. This api can be simplified to a String via your own simple @Composable wrapper, but the simpler version can't be expanded to handle more diverse content. I completely agreed with your view when I first used it, now having compared it to the rest of Compose and Wear Compose, I have come to like the decision they made.
Chris Sinco [G]
12/19/2021, 12:30 PMChris Sinco [G]
12/19/2021, 12:33 PMyschimke
12/19/2021, 12:36 PMAsh
12/19/2021, 11:13 PMif (LocalConfiguration.current.isScreenRound) {
so we just call Row and it always does the correct thing. As we get more complex foldable devices our developers just call Row and the correct thing always happens.Ash
12/19/2021, 11:13 PMMenu
and on very device / every configuration the menu is correct for that device and configuration ... 😀Sergio Sancho
12/20/2021, 10:32 AMChris Sinco [G]
12/21/2021, 8:59 AM