Tagged articles
LiveData
17 articles · Page 1 of 1
This article explains the MVVM (Model-View-ViewModel) architecture for modern Android development, detailing its three core components, their responsibilities, and provides a step‑by‑step example with Jetpack components, including LiveData, ViewModel, View Binding, and complete code snippets to build a simple user list UI.
AndroidJavaKotlin
0 likes · 8 min read

This article introduces Google's recommended MVI (Model-View-Intent) architecture for Android, compares it with MVVM, explains the benefits of unidirectional data flow, and provides practical Kotlin implementations—including LiveData state handling, single-event management, and step-by-step code examples—to guide developers in adopting MVI in mobile projects.
AndroidLiveDataMVI
0 likes · 16 min read

When observing LiveData in Android MVVM, developers may be misled by log deduplication, Java‑8 lambda optimizations that reuse a single Observer, automatic replay of the latest value to new observers, and shared ViewModel navigation bugs, but using an Event wrapper, reflection to reset version counters, or switching to Kotlin Flow/SharedFlow can safely avoid these pitfalls.
AndroidJavaKotlin
0 likes · 20 min read

This article explains two Kotlin‑based network request wrappers for Android that reduce boilerplate by using LiveData, Retrofit, OkHttp and coroutines, compares their design trade‑offs, provides complete Activity, ViewModel, Repository and BaseRepository code samples, and shows how to handle loading, success, error and multiple data sources in a clean MVVM architecture.
AndroidCoroutinesKotlin
0 likes · 10 min read

This article explains how to integrate Retrofit with Kotlin coroutines following Google’s Android architecture guidelines, covering coroutine basics, OkHttp and Retrofit setup, generic response handling, repository abstraction, ViewModel usage, and lifecycle‑aware coroutine scopes to achieve clean, asynchronous network calls.
AndroidKotlin CoroutinesLiveData
0 likes · 13 min read

To tame the growing complexity of QQ Music’s Android playback page, the team replaced the monolithic MVC/SubController design with a clean, layered architecture that uses lightweight, lifecycle‑aware ViewDelegates and LiveData, enabling on‑demand module loading, clear separation of concerns, reduced memory usage, and reusable UI components.
AndroidLiveDataMVVM
0 likes · 23 min read

The article explains reactive programming fundamentals, shows why traditional OO assignments struggle with dynamic data relationships, and introduces the LiveData Extensions library that leverages MediatorLiveData to create lifecycle‑aware, chainable operators (map, filter, merge, etc.), dramatically reducing boilerplate and improving code metrics in Android apps.
AndroidKotlinLiveData
0 likes · 9 min read

This article explains the purpose and characteristics of Android Jetpack's ViewModel component, demonstrates how to use it with LiveData in Activities and Fragments, shows code examples for data sharing between fragments, and provides an in‑depth analysis of its internal source code and lifecycle handling.
JetpackLiveDataViewModel
0 likes · 21 min read

This article explains how Ctrip's flight Android app refactored its home page using Kotlin coroutines, Jetpack AAC components, and MVVM architecture, detailing the technical and business background, code patterns, production issues, and lessons learned for large‑scale mobile development.
AndroidCoroutinesJetpack
0 likes · 20 min read

The article describes how a Ctrip senior Android engineer uses divide‑and‑conquer, MVP with Clean Architecture, and Jetpack components such as LiveData and ViewModel to break down a highly coupled payment module into reusable view components, improve data flow, and simplify testing and maintenance.
AndroidDivide and ConquerLiveData
0 likes · 10 min read

This article provides a detailed source‑code analysis of Android Jetpack’s Lifecycle, LiveData, and ViewModel components, explaining their architecture, usage examples, internal mechanisms, and offering practical techniques such as bottom‑up and top‑down analysis, code navigation tips, and unit‑test strategies for developers.
AndroidLifecycleLiveData
0 likes · 38 min read

This article proposes a solution to avoid data inconsistency caused by RecyclerView ViewHolder reuse by giving each ViewHolder its own lifecycle, integrating MVVM via a BaseLifecycleViewHolder, BaseLifeCycleAdapter, and VHLiveData, and demonstrates implementation details with Kotlin and Java code examples.
JavaKotlinLifecycle
0 likes · 13 min read

This article examines Android message‑passing mechanisms, comparing traditional EventBus, RxBus, and Otto with the lifecycle‑aware LiveData‑based LiveEventBus, detailing their implementations, advantages, and how LiveData’s observe, observeForever, setValue, and postValue methods enable a memory‑leak‑free event bus for mobile development.
AndroidArchitecture ComponentsEventBus
0 likes · 12 min read

Meituan transformed its monolithic cash‑register apps into a component‑based architecture using WMRouter as the routing foundation and built a strongly‑constrained modular‑event message bus—leveraging annotations, generated interfaces, and LiveData—to ensure type‑safe, module‑scoped communication, improve code reuse, reduce coupling, and simplify maintenance.
AndroidComponentizationLiveData
0 likes · 18 min read

This article examines Android’s evolving message‑passing mechanisms, comparing traditional EventBus and RxBus with the newer LiveDataBus, detailing their architectures, code implementations, limitations such as pre‑subscription message delivery, and presents a refined LiveDataBus solution that leverages lifecycle‑aware LiveData to avoid memory leaks.
AndroidArchitecture ComponentsEventBus
0 likes · 21 min read

This article explains the Android Paging Library introduced in Google I/O 2018, covering its background, architecture, core components such as DataSource and PagedList, loading flow, and step‑by‑step usage with Gradle, LiveData, and RecyclerView adapters for efficient pagination in mobile apps.
AndroidArchitecture ComponentsLiveData
0 likes · 9 min read

This article introduces Google’s Android Architecture Components—Lifecycle, LiveData, ViewModel, and Room—explaining their principles, how they simplify lifecycle management and data handling, and provides practical integration techniques and best‑practice guidelines for mobile developers.
AndroidArchitecture ComponentsLifecycle
0 likes · 10 min read
