Tag: Kotlin
All the articles with the tag "Kotlin".
-
Android Starter Pattern and Adapter Click Listener Best Practice
Learn the Android starter pattern — a static factory method that hides Intent keys and enforces required parameters — and why adapters should never open activities directly, using a higher-order function as an item click listener instead.
-
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.
-
Debounced Search in Android with Kotlin Flow — debounce, filter, distinctUntilChanged, flatMapLatest
Build an optimized search with Kotlin Flow — understand how debounce, filter, distinctUntilChanged, and flatMapLatest each solve a specific problem, and why flatMapMerge causes silent UI bugs.
-
Parallel Network Calls and Error Handling in Kotlin Flow — zip, catch, and emitAll
Learn how zip runs two network calls in parallel in Kotlin Flow, how catch handles errors at the pipeline level and per-task level, and how emitAll provides fallback values when one call fails.