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
Introduction
- Kotlin best practices for Android
- What you should know
From Java to Kotlin
- Kotlin language features
- EditorConfig
Properties and Fields
- Auto convert and the operator
- On-demand property - Getters
- Lazy initialization - lazy()
- Late initialization - lateinit
- Kotlin Android extensions
Conditionals
- Elvis operator
- Scope functions - let
- Scope functions - apply
- The when expression
- Sealed classes
Readability
- Data class
- String templates
- Functional programming - map, reduce
- Functional programming - find, filter
- Functional programming - all, Any
- Android KTX
Conclusion
- Next steps