Your message design now has a layout, but it doesn't look great yet.
Jetpack Compose provides an implementation of Material Design 3 and its UI elements out of the
box. You'll improve the appearance of our
composable using Material Design styling.
To start, wrap the
MessageCard function with the
Material theme created in your project,
as well as a
Do it both in the
@Preview and in the
setContent function. Doing so will allow your composables
to inherit styles as defined in your app's theme ensuring consistency across your app.
Material Design is built around three pillars:
You will add them one by one.
Note: the Empty Compose Activity template generates a default theme for your project that
allows you to customize
If you named your project anything different from
ComposeTutorial, you can find your custom theme in the
Theme.kt file in the