Your First Kotlin Android App: Polishing the App

Jul 14 2022 · Kotlin 1.6, Android 12, Android Studio Bumblebee | 2021.1.1

Part 1: Build Out the App

06. Improve the Alert Title

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: 05. Challenge: Keep Track of Game Rounds Next episode: 07. Challenge: Add Bonus Points

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've reached locked video content where the transcript will be shown as obfuscated text.

Okay, this is not a challenge episode. I didn’t mean what I said earlier.

private fun alertTitle(): String {
    
}
val difference = abs(targetValue - sliderValue)
val title: String = if (difference == 0) {
    getString(R.string.alert_title_1)
} else if (difference < 5) {
    getString(R.string.alert_title_2)
} else if (difference <= 10) {
    getString(R.string.alert_title_3)
} else {
    getString(R.string.alert_title_4)
}
...
return title
val dialogTitle = alertTitle()
private fun differenceAmount() = abs(targetValue - sliderValue)