Mark02/02/2023, 2:57 AM
why are the buttons not styled according to Material spec? https://foso.github.io/Jetpack-Compose-Playground/material/alertdialog/ https://m2.material.io/components/dialogs/android#alert-dialog
Albert Chang02/02/2023, 3:25 AM
should be used instead of
. See official document.
Mark02/02/2023, 3:36 AM
, most likely because that’s the most instinctive composable to use. It seems a likely error that by having such a flexible
that the spec will be disregarded. What I was wondering was whether a
used in, say,
composable, would somehow pick up some styling (by default) that would make it look like the appropriate
(which is just a
with a couple of default args).
Albert Chang02/02/2023, 3:37 AM
Mark02/02/2023, 3:45 AM
, and that this should be default when wrapped inside a
composable. Or at least some way to say it explicitly. I guess that’s how it was done in the XML world, so it takes some adjusting. It just seems strange to me that there is not an easier way to create an
without these potential issues that are easily made. At the very least I would also expect a composable for
that takes simple button labels (Strings) to ensure they are styled correctly, since this is probably what 90% (or even 99%) of cases require.
Albert Chang02/02/2023, 3:50 AM
Mark02/02/2023, 4:01 AM
, I’m ending up spending a lot of time trying to figure out how to apply the proper styling. I’m not seeing many defaults being applied from the theme. For example, using a
the label is not captialized, so I have to do it myself. Or for the title, I end up trying a bunch of different text styles until I find one that looks right (subtitle1 and bold!?). What am I missing?
Albert Chang02/02/2023, 4:06 AM
Mark02/02/2023, 4:30 AM
Albert Chang02/02/2023, 4:38 AM
Mark02/02/2023, 4:39 AM
Albert Chang02/02/2023, 4:40 AM
Mark02/02/2023, 4:41 AM