Reader small image

You're reading from  Android UI Development with Jetpack Compose - Second Edition

Product typeBook
Published inNov 2023
Reading LevelN/a
PublisherPackt
ISBN-139781837634255
Edition2nd Edition
Languages
Tools
Right arrow
Author (1)
Thomas Künneth
Thomas Künneth
author image
Thomas Künneth

Thomas Künneth is a Google Developer Expert for Android and has been a speaker and panelist at multiple international conferences about Android. Currently, Thomas works as a senior Android developer at Snapp Mobile. He has authored countless articles as well as one of the top-selling German Android books (currently in its sixth edition). He has also frequently contributed to various open source projects.
Read more about Thomas Künneth

Right arrow

Adding navigation

Scaffold() allows you to put content in a slot at the bottom of the screen using its bottomBar parameter. This can, for example, be a BottomAppBar(). Material Design bottom app bars provide access to a bottom navigation drawer and up to four actions, including a floating action button. ComposeUnitConverter adds BottomNavigation() instead. Material Design bottom navigation bars allow movement between primary destinations in an app.

Defining screens

Conceptually, primary destinations are screens, something that, before Jetpack Compose, may have been displayed in separate activities. Here’s how screens are defined in ComposeUnitConverter:

sealed class ComposeUnitConverterScreen(
  val route: String,
  @StringRes val label: Int,
  val icon: ImageVector
) {
  companion object {
    val screens = listOf(
      Temperature,
      Distances...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Android UI Development with Jetpack Compose - Second Edition
Published in: Nov 2023Publisher: PacktISBN-13: 9781837634255

Author (1)

author image
Thomas Künneth

Thomas Künneth is a Google Developer Expert for Android and has been a speaker and panelist at multiple international conferences about Android. Currently, Thomas works as a senior Android developer at Snapp Mobile. He has authored countless articles as well as one of the top-selling German Android books (currently in its sixth edition). He has also frequently contributed to various open source projects.
Read more about Thomas Künneth