Better Programming

Advice for programmers.

Follow publication

Member-only story

Android Material Theming in Jetpack Compose

Satya Pavan Kantamani
Better Programming
Published in
6 min readApr 12, 2021
Jetpack Compose logo
Photo by the author.

Jetpack Compose is Android’s UI toolkit of the future. It is currently in beta. If you haven't gone through my previous article, please check out my Introduction to Jetpack Compose. It gives the basic idea behind and usage of Jetpack Compose.

In this article, we will learn how to implement theming using Jetpack Compose. Jetpack Compose theming has different APIs that provide flexibility to style our app. With the help of Material Theming, we can provide a consistent look for our app.

In the traditional approach of building UI through XML, we used themes.xml to design and apply themes to elements where required. But with Jetpack, we do everything at the class level using different APIs.

Let’s see how to customize colors, typography, and shapes so that they are used consistently throughout our application. Themes in Jetpack Compose are based on Material Design. It is much easier to set custom themes with only a few lines of code.

Material Theme

A Material Theme defines the styling principles from the Material Design specification. In Jetpack Compose, MaterialTheme is available as a composable function with which we can customize the default…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Satya Pavan Kantamani
Satya Pavan Kantamani

Written by Satya Pavan Kantamani

Android Dev, Interested in Traveling, App development. Based in Hyderabad, India. Catch me at https://about.me/satyapavankumar

Write a response