Tag: android
All the articles with the tag "android".
-
Android LiveData — Observable, Lifecycle-Aware, and the Two-Variable Pattern
Understand LiveData's two core properties — observable data holder and lifecycle-aware delivery — the difference between setValue and postValue, and why ViewModel uses a private MutableLiveData with a public LiveData to enforce MVVM boundaries.
-
Lambdas, Higher-Order Functions, and Typealias in Kotlin
Understand lambdas as functions, higher-order functions that accept or return functions, how Java interface listeners map to Kotlin lambda parameters, and how typealias improves readability without adding runtime cost.
-
Android ViewModel Internals — ViewModelProvider, ActivityThread, and the Factory Pattern
Understand the full internal chain of Android's ViewModel — how ViewModelProvider, ComponentActivity, NonConfigurationInstance, ViewModelStore, and ActivityThread work together across three lifecycle scenarios, and when a ViewModelFactory is required.
-
Android ViewModel Internals — Why Data Gets Lost on Rotation and How to Fix It
Build a ViewModel from scratch to understand why Android data is lost on orientation change, how storing it in the Application class fixes one problem but introduces another, and the two rules every ViewModel must follow.