MaterialTheme

With your pizza preview in place, it is time to add a fresh coat of paint to Coda Pizza. Currently, Coda Pizza is using the default theme, but you can add your own customizations to specify your application’s colors, typographic styles, and shapes for various components like Buttons and Cards. For Coda Pizza, you will stick to changing your app’s colors, although the steps are similar for other customizations.

You saw themes for the first time in Chapter 11. The themes that you are familiar with were defined in XML and were used by your framework views for styling. But Compose has its own theming system that does not leverage XML styles or the theming system used by framework views.

Themes are stored in an object ...

Get Android Programming: The Big Nerd Ranch Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.