Tag

LiveData

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 22, 2024 · Mobile Development

Android MVVM Architecture

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
Android MVVM Architecture
IEG Growth Platform Technology Team
IEG Growth Platform Technology Team
Sep 15, 2022 · Mobile Development

Understanding and Implementing MVI Architecture in Android Applications

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.

AndroidKotlinLiveData
0 likes · 16 min read
Understanding and Implementing MVI Architecture in Android Applications
vivo Internet Technology
vivo Internet Technology
Jan 12, 2022 · Mobile Development

Pitfalls of LiveData Observation and Lambda Optimizations in Android MVVM

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
Pitfalls of LiveData Observation and Lambda Optimizations in Android MVVM
Sohu Tech Products
Sohu Tech Products
Oct 20, 2021 · Mobile Development

Kotlin Network Request Wrappers with LiveData: Two Approaches, Code Samples, and Comparison

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.

AndroidKotlinLiveData
0 likes · 10 min read
Kotlin Network Request Wrappers with LiveData: Two Approaches, Code Samples, and Comparison
Sohu Tech Products
Sohu Tech Products
Aug 11, 2021 · Mobile Development

Encapsulating Retrofit with Kotlin Coroutines in Android MVVM Architecture

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
Encapsulating Retrofit with Kotlin Coroutines in Android MVVM Architecture
Tencent Music Tech Team
Tencent Music Tech Team
Jul 22, 2021 · Mobile Development

Modular Architecture and ViewDelegate Design for QQ Music Playback Page on Android

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
Modular Architecture and ViewDelegate Design for QQ Music Playback Page on Android
Tencent Music Tech Team
Tencent Music Tech Team
Mar 26, 2021 · Mobile Development

Reactive Programming and LiveData Extensions for Android Development

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
Reactive Programming and LiveData Extensions for Android Development
Sohu Tech Products
Sohu Tech Products
Mar 3, 2021 · Mobile Development

Understanding Android Jetpack ViewModel: Concepts, Usage, and Source Code Analysis

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.

AndroidJetpackLiveData
0 likes · 21 min read
Understanding Android Jetpack ViewModel: Concepts, Usage, and Source Code Analysis
Ctrip Technology
Ctrip Technology
Dec 3, 2020 · Mobile Development

Applying Kotlin Coroutines and Jetpack MVVM in Ctrip Flight App: Architecture, Implementation, and Production Challenges

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.

AndroidJetpackKotlin
0 likes · 20 min read
Applying Kotlin Coroutines and Jetpack MVVM in Ctrip Flight App: Architecture, Implementation, and Production Challenges
JD Retail Technology
JD Retail Technology
Aug 10, 2020 · Mobile Development

Source Code Analysis of Android Lifecycle, LiveData, and ViewModel

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
Source Code Analysis of Android Lifecycle, LiveData, and ViewModel
Sohu Tech Products
Sohu Tech Products
Jan 22, 2020 · Mobile Development

Implementing Lifecycle‑Aware ViewHolder with MVVM in Android RecyclerView

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.

AndroidJavaKotlin
0 likes · 13 min read
Implementing Lifecycle‑Aware ViewHolder with MVVM in Android RecyclerView
Beike Product & Technology
Beike Product & Technology
Mar 21, 2019 · Mobile Development

Understanding LiveData and Event Bus Implementations in Android

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
Understanding LiveData and Event Bus Implementations in Android
JD Retail Technology
JD Retail Technology
Jul 18, 2018 · Mobile Development

Understanding Android Paging Library: Architecture, Components, and Usage

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 ComponentsDataSource
0 likes · 9 min read
Understanding Android Paging Library: Architecture, Components, and Usage
JD Retail Technology
JD Retail Technology
Jun 15, 2018 · Mobile Development

Practical Guide to Android Architecture Components: Lifecycles, LiveData, and ViewModel Integration

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
Practical Guide to Android Architecture Components: Lifecycles, LiveData, and ViewModel Integration