Your First Kotlin Android App: Polishing the App

Aug 22 2023 · Kotlin 1.8.20, Android 13, Android Studio Flamingo | 2022.2.1

Part 3: Finish the App

19. Create an About Page

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: 18. Introduction Next episode: 20. Add Navigation to the App

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.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

About Page Strings

🎉 Bullseye 🎉' This is Bullseye, the game where you can win points and earn fame by dragging a slider.\nYour goal is to place the slider as close as possible to the target value. The closer you are, the more points you score.\nEnjoy! Go Back! About Bullseye


import androidx.compose.runtime.Composable

@Composable
fun AboutScreen() {

}

@Preview(showBackground = true, device = Devices.AUTOMOTIVE_1024p, widthDp = 864, heightDp = 432)
@Composable
fun AboutScreenPreview() {
  AboutScreen()
}
Scaffold() {

}
@OptIn(ExperimentalMaterial3Api::class) // New Code
@Composable
fun AboutScreen() {
  Scaffold() {

  }
}
Scaffold(
  // New Code Start
  topBar = {
    TopAppBar(
      title = { Text(stringResource(id = R.string.about_page_title)) },
      navigationIcon = {
        IconButton(onClick = { }) {
          Icon(
            imageVector = Icons.Filled.ArrowBack,
            contentDescription = stringResource(id = R.string.back_button_text)
          )
        }
      },
      colors = TopAppBarDefaults.smallTopAppBarColors(
        containerColor = MaterialTheme.colorScheme.primary,
        titleContentColor = MaterialTheme.colorScheme.onPrimary,
        navigationIconContentColor = MaterialTheme.colorScheme.onPrimary
      )
    )
  }
  // New Code End
) {

}
Scaffold(
  topBar = {
    //...
  },
) { paddingValues ->
  //... Add in the Content here
}
Column(
  horizontalAlignment = Alignment.CenterHorizontally,
  verticalArrangement = Arrangement.Center,
  modifier = Modifier
    .padding(paddingValues)
    .fillMaxSize()
) {

}
Text(
  text = stringResource(id = R.string.about_title_text),
  style = MaterialTheme.typography.displayMedium.copy(fontWeight = FontWeight.Bold)
)
Text(
  text = stringResource(id = R.string.about_bullseye_text),
  textAlign = TextAlign.Center,
  style = MaterialTheme.typography.bodyLarge,
  modifier = Modifier.padding(horizontal = 16.dp, vertical = 24.dp)
)
Button(
  onClick = { },
  shape = MaterialTheme.shapes.medium,
) {
  Text(text = stringResource(id = R.string.back_button_text))
}
.consumedWindowInsets(paddingValues)