Kotlin for Android: Best Practices
1h 14mIntermediate2019-05-10
Authors

Chiu-Ki Chan
Android Developer, Speaker, Teacher
Course details
Kotlin is a popular programming language, and for good reason; it’s pragmatic, fun, and officially supported by Google as an Android development language. In this course, discover how to leverage the power of Kotlin when developing Android mobile apps. Instructor Chiu-Ki Chan shares best practices for working with some of this popular language’s most helpful features. Discover how to dynamically fetch the value of a property with getter, use Kotlin Android extensions, work with scope functions, and format your strings with string templates. Plus, see how to use the Android KTX extensions from Google to make your Android code more readable.
Learning objectives
What’s special about Kotlin?
Converting your Java code into Kotlin
Using the lateinit keyword
Scope functions
Kotlin Android extensions
Using the elvis operator
Functional programming
Android KTX
Learning objectives
What’s special about Kotlin?
Converting your Java code into Kotlin
Using the lateinit keyword
Scope functions
Kotlin Android extensions
Using the elvis operator
Functional programming
Android KTX
Skills covered
KotlinAndroid DevelopmentMobile DevelopmentProgramming LanguagesOpen SourceSoftware DevelopmentOne-Off
Concepts
0. Introduction
- 01 - Kotlin best practices for Android
- 02 - What you should know
1. From Java to Kotlin
- 03 - Kotlin language features
- 04 - EditorConfig
2. Properties and Fields
- 05 - Auto convert and the operator
- 06 - On-demand property - Getters
- 07 - Lazy initialization - lazy()
- 08 - Late initialization - lateinit
- 09 - Kotlin Android extensions
3. Conditionals
- 10 - Elvis operator
- 11 - Scope functions - let
- 12 - Scope functions - apply
- 13 - The when expression
- 14 - Sealed classes
4. Readability
- 15 - Data class
- 16 - String templates
- 17 - Functional programming - map, reduce
- 18 - Functional programming - find, filter
- 19 - Functional programming - all, Any
- 20 - Android KTX
Conclusion
- 21 - Next steps
Related courses
- Exploring Ktor with Kotlin Multiplatform and Compose
- Kotlin Multiplatform Libraries
- Kotlin Multiplatform Development
- Android Compose with Kotlin
- Complete Guide to Android Development with Kotlin for Beginners
- Transitioning from Java to Kotlin
- Advanced Kotlin Database Development
- Kotlin Essential Training: Object-Oriented and Async Code