Jetpack Compose

Oct 11 2022 · Kotlin 1.7.10, Android 13, Android Studio Chipmunk

Part 2: Build Complex UI with Compose

12. Add Themes & Styling to the App

Episode complete

Play next episode

Next
About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 11. Build Custom Dialogs Next episode: 13. Reuse UI in Multiple Screens

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Notes: 12. Add Themes & Styling to the App

The student materials have been reviewed and are updated as of September 2022.

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

Intro

[Slide 1 - Light and Dark mode]

Demo

Start by opening the file named Theme, within the composeUi package.

@Composable
fun LibrarianTheme(
  isDarkTheme: Boolean = isSystemInDarkTheme(),
  content: @Composable () -> Unit
) {
  MaterialTheme(
    colors = if (isDarkTheme) DarkColors else LightColors
  ) {
    content()
  }
}

enabledColor: Color = MaterialTheme.colors.primary

contentColor = MaterialTheme.colors.onSecondary