# Crash course on the Android UI layer | Part 1

DevFeed: [Crash course on the Android UI layer | Part 1](<https://devfeed.tech/articles/crash-course-on-the-android-ui-layer-part-1-22598.md>)

Original publisher: [Read original article](<https://medium.com/bumble-tech/crash-course-on-the-android-ui-layer-part-1-2094221a9be3?source=rss----6353b5325b1a---4>)

Author: Manuel Vivo

Published: 2023-12-13T17:03:40Z

Content type: tutorial

Language: en

Sources: [Bumble Tech](<https://devfeed.tech/sources/bumble-tech.md>)

Topics: [ui](<https://devfeed.tech/topics/ui.md>), [Android](<https://devfeed.tech/topics/android.md>), [business logic](<https://devfeed.tech/topics/business-logic.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app-architecture](<https://devfeed.tech/tags/app-architecture.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [business-logic](<https://devfeed.tech/tags/business-logic.md>), [state-management](<https://devfeed.tech/tags/state-management.md>), [ui](<https://devfeed.tech/tags/ui.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

## AI overview

Part 1 of a series explains the Android UI layer, UI state, and the roles of the UI, data, and optional domain layers. It introduces separation of concerns, state holders, unidirectional data flow, and related best practices.

## Source excerpt

Crash Course on the Android UI Layer | Part 1The UI and UI State This blog post series aims to summarise the Android Developer guidance on the UI layer. We'll explore all the entities involved in it, understand the role each part plays, and discuss best practices. By the end of this series, you will have a general understanding of what happens on the UI layer and how to best handle state and logic within it, the various APIs involved, and how to use them. Additionally, we'll provide decision trees to assist you when you're in doubt. This is part 1, where we're covering the UI and the UI state. Part 2 covers state holders and other UI layer-related topics such as where to hoist state and save state on Android. If you prefer to consume this content in video format, check out the talk I delivered at Droidcon London 2023: Peeling Back the Layers: Unmasking the UI-nknown! The UI layer in the grand scheme of things The UI layer isn't the only layer you can find in a typical app architecture. Alongside it, you can also find the data layer and sometimes, the domain layer. According to the Android Architecture documentation: The UI layer displays data on the screen. The data layer exposes application data and contains the vast majority of the business logic of the app. The domain layer is an optional layer that aims to 1) simplify and 2) reuse the potential business logic complexity of the UI layer. No less, no more. Note: The business logic is what gives value to your application. It's the implementation of product requirements that determines how your app fetches, stores, and modifies data.Architecture layers in a typical Android app: The UI, data, and domain layersEntities in the UI layer The UI layer consists of three distinct entities with clearly defined responsibilities. This distinction helps with separation of concerns, enhances testability, and promotes reusability. The UI, or UI elements, render data on the screen. The UI state describes the data to render on the