Kotlin for Android: Best Practices

Kotlin for Android: Best Practices

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 1h 13m | 205 MB

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.

Topics include:

  • 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
Table of Contents

Introduction
1 Kotlin best practices for Android
2 What you should know

From Java to Kotlin
3 Kotlin language features
4 EditorConfig

Properties and Fields
5 Auto convert and the !! operator
6 On-demand property Getters
7 Lazy initialization lazy()
8 Late initialization lateinit
9 Kotlin Android extensions

Conditionals
10 Elvis operator
11 Scope functions let
12 Scope functions apply
13 The when expression
14 Sealed classes

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