Android
Architecture Patterns
Software Development
Mobile App Development
MVVM

Which Architecture patterns are used on Android?

Interview Questions practice on Codemia

Over 8,000 real interview questions from top companies, searchable by company and role.

Browse interview questions

Introduction

Android has used several architecture patterns over time, but the most common ones developers discuss are MVC, MVP, MVVM, MVI-style unidirectional state flow, and layered approaches often described as Clean Architecture. The right choice depends less on fashion and more on how you want state, UI logic, and business rules to be separated.

In modern Android development, MVVM plus a repository/data layer is the most common baseline, especially when paired with Jetpack components and declarative UI patterns.

Historical Patterns: MVC and MVP

Early Android apps often drifted into an MVC-like shape where:

  • models held data
  • XML plus widgets formed the view
  • 'Activity or Fragment acted as controller'

In practice, this often produced “massive activities” because Android framework classes accumulated UI logic, navigation, lifecycle code, and business coordination.

MVP tried to fix that by moving presentation logic into a presenter.

kotlin
1interface LoginView {
2    fun showLoading()
3    fun showSuccess()
4    fun showError(message: String)
5}
6
7class LoginPresenter(private val view: LoginView) {
8    fun login(username: String, password: String) {
9        view.showLoading()
10        if (username == "demo" && password == "secret") {
11            view.showSuccess()
12        } else {
13            view.showError("Invalid credentials")
14        }
15    }
16}

This improved testability, but presenter-heavy code could still become large.

MVVM Became the Common Default

MVVM fits Android well because a ViewModel survives configuration changes more gracefully than putting all state in an Activity, and it works naturally with observable state.

kotlin
1class CounterViewModel : ViewModel() {
2    private val _count = MutableStateFlow(0)
3    val count: StateFlow<Int> = _count
4
5    fun increment() {
6        _count.value += 1
7    }
8}

The view observes state, and the ViewModel exposes commands and derived data. This works with both XML-based UIs and modern Compose-based screens.

MVI and Unidirectional Data Flow

Some Android teams prefer MVI-style designs or similar unidirectional state models. The exact naming varies, but the core idea is stable:

  • the UI emits events
  • a state holder processes them
  • the UI renders a single state object

This style is especially attractive in Compose because rendering UI from immutable state maps cleanly onto declarative UI updates.

Clean Architecture as a Layering Strategy

Clean Architecture is often used alongside MVVM rather than instead of it. In Android discussions, it usually means separating the app into layers such as:

  • UI layer
  • domain or use-case layer
  • data layer

So a real project might be described as “MVVM with repositories and use cases,” not as one isolated named pattern.

What Teams Actually Use

In real Android codebases, patterns are often blended:

  • MVVM for presentation
  • repositories for data access
  • use cases for business rules
  • unidirectional state flow for UI events and state

That blend is more realistic than expecting every app to match one textbook diagram.

Common Pitfalls

  • Treating architecture names as rigid templates instead of tradeoff-driven design tools.
  • Leaving too much logic in Activity or Fragment classes and calling it MVC by accident.
  • Building so many layers that simple screens become harder to understand, test, and change.
  • Confusing MVVM with “put every piece of code into a ViewModel,” which creates another kind of giant class.
  • Debating pattern names while ignoring the real goals of state ownership, testability, and separation of concerns.

Summary

  • Android has used MVC, MVP, MVVM, MVI-style state flow, and Clean Architecture-inspired layering.
  • In modern Android apps, MVVM with repositories is the most common baseline.
  • MVI-style state management is especially popular in declarative UI flows.
  • Clean Architecture usually describes layering around a presentation pattern rather than replacing it.
  • Good Android architecture is about clear state and responsibility boundaries, not about picking the trendiest acronym.

Related reading
Free course
Beginner
7 lessons
2 hours
Tackling System Design Interview Problems

A short course that equips you with the skills to approach system design interviews methodically.

Start the free course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

Interview Questions practice on Codemia

Over 8,000 real interview questions from top companies, searchable by company and role.

Browse interview questions

All Rights Reserved.