# Android framework

Published articles for Android framework.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Chasing Monet inside the Android framework

DevFeed: [Chasing Monet inside the Android framework](<https://devfeed.tech/articles/chasing-monet-inside-the-android-framework-28362.md>)

Original publisher: [Read original article](<https://siddroid.com/post/android/chasing-monet-inside-the-android-framework/>)

Author: Siddhesh Patil

Published: 2022-04-27T23:50:55Z

Content type: article

Language: en

Sources: [Sid Patil - Android Engineer and Kotlin Advocate](<https://devfeed.tech/sources/sid-patil-android-engineer-and-kotlin-advocate.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [material-you](<https://devfeed.tech/topics/material-you.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>), [ui](<https://devfeed.tech/topics/ui.md>), [color](<https://devfeed.tech/topics/color.md>), [aosp](<https://devfeed.tech/topics/aosp.md>), [android-13](<https://devfeed.tech/topics/android-13.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-12](<https://devfeed.tech/tags/android-12.md>), [android-13](<https://devfeed.tech/tags/android-13.md>), [android-framework](<https://devfeed.tech/tags/android-framework.md>), [android-open-source-project](<https://devfeed.tech/tags/android-open-source-project.md>), [android-system-ui](<https://devfeed.tech/tags/android-system-ui.md>), [aosp](<https://devfeed.tech/tags/aosp.md>), [article](<https://devfeed.tech/tags/article.md>), [articles-by-sid-patil](<https://devfeed.tech/tags/articles-by-sid-patil.md>), [color](<https://devfeed.tech/tags/color.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [design](<https://devfeed.tech/tags/design.md>), [design-system](<https://devfeed.tech/tags/design-system.md>), [dynamic-colors-jetpack-compose](<https://devfeed.tech/tags/dynamic-colors-jetpack-compose.md>), [dynamic-theming](<https://devfeed.tech/tags/dynamic-theming.md>), [dynamic-theming-on-android](<https://devfeed.tech/tags/dynamic-theming-on-android.md>), [framework](<https://devfeed.tech/tags/framework.md>), [how-does-dynamic-theming-work-on-android](<https://devfeed.tech/tags/how-does-dynamic-theming-work-on-android.md>), [internals](<https://devfeed.tech/tags/internals.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [material-design-3](<https://devfeed.tech/tags/material-design-3.md>), [material-you](<https://devfeed.tech/tags/material-you.md>), [md3](<https://devfeed.tech/tags/md3.md>), [monet](<https://devfeed.tech/tags/monet.md>), [monet-in-aosp](<https://devfeed.tech/tags/monet-in-aosp.md>), [monet-theme-engine](<https://devfeed.tech/tags/monet-theme-engine.md>), [monet-theming](<https://devfeed.tech/tags/monet-theming.md>), [pixel](<https://devfeed.tech/tags/pixel.md>), [system-ui-apk](<https://devfeed.tech/tags/system-ui-apk.md>), [tiramisu](<https://devfeed.tech/tags/tiramisu.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

A technical deep dive into Monet, the Android framework changes behind Android 12/12L dynamic theming and Material You. It explains how System UI responds to wallpaper changes, extracts colors, generates tonal palettes, and refreshes the system context.

### Source excerpt

We deep dive into the internals of the Android framework, covering the System-UI to understand the changes introduced starting from Android 12/12L and above, code-named Monet. We will explore the new system-wide dynamic theming capabilities and take a look at how Monet fuels the Material You design.

## Easy Android Scopes

DevFeed: [Easy Android Scopes](<https://devfeed.tech/articles/easy-android-scopes-30595.md>)

Original publisher: [Read original article](<https://ryanharter.com/blog/2020/03/easy-android-scopes/>)

Published: 2020-03-13T16:09:47Z

Content type: tutorial

Language: en

Sources: [Blogs on Ryan Harter](<https://devfeed.tech/sources/blogs-on-ryan-harter.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-framework](<https://devfeed.tech/tags/android-framework.md>), [cache](<https://devfeed.tech/tags/cache.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>)

### AI overview

This tutorial examines how to scope Android objects across lifecycle changes, especially when Activities and Fragments are recreated during configuration changes. It discusses retaining presenters and extending lifecycle-bound retention to objects such as Dagger Components, while noting the limitations of the deprecated onRetainNonConfigurationInstance approach.

### Source excerpt

A common challenge when writing Android apps is properly scoping objects: if they outlive the lifecycle in which they're needed then we are wasting memory and they can be leaked, but if we recreate objects too soon then we could be duplicating work when we don't need to. The most common place that this manifests in is Activities and Fragments, since they're destroyed and replaced by a new instance during events like configuration changes, which can be unintuitive, at first.

## ViewModel. How it works.

DevFeed: [ViewModel. How it works.](<https://devfeed.tech/articles/viewmodel-how-it-works-26015.md>)

Original publisher: [Read original article](<https://unbreakable-titan.medium.com/viewmodel-how-it-works-434282649286?source=rss-e32583ce94d4------2>)

Author: Vladislav Puryev

Published: 2020-01-18T15:40:09Z

Content type: tutorial

Language: en

Sources: [Stories by Vladislav Puryev on Medium](<https://devfeed.tech/sources/stories-by-vladislav-puryev-on-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Google](<https://devfeed.tech/topics/google.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [abstract-class](<https://devfeed.tech/tags/abstract-class.md>), [android](<https://devfeed.tech/tags/android.md>), [android-framework](<https://devfeed.tech/tags/android-framework.md>), [code](<https://devfeed.tech/tags/code.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [evolution](<https://devfeed.tech/tags/evolution.md>), [java](<https://devfeed.tech/tags/java.md>), [screen](<https://devfeed.tech/tags/screen.md>), [state](<https://devfeed.tech/tags/state.md>), [technical](<https://devfeed.tech/tags/technical.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

### AI overview

This technical tutorial examines how Android ViewModel works internally and how it helps preserve screen state across configuration changes. It explains that ViewModel itself is a simple abstract class and that state retention results from processes within the Android framework, with correct initialization and factories required for dependencies.

### Source excerpt

Android ViewModel. How it works. Hello everybody. This post will be about popular solution from Google for Android developers -- ViewModel (if you are not familiar with it yet -- get started from official documentation). The main goal of article -- show you how viewModel works, how this tool helps us to save state of our screens. First of all it is better to note that viewModel -- is just java code inside Android framework and there is no any magic... almost. This mechanism was improved something about three times from its origin (2017) till the present day. Let's take a look at "Evolution of anatomy". WARNING! This article contains a lot of technical content and internals of Android framework. And please pay attention -- all demonstrated code you can find in your Android Framework using middle-click or ctrl + left-click. There is no any of self-made code -- all is inside Android framework. Attention again -- most of code will be provided in shortened form. Only necessary details. Full versions you can find in Android Framework source codes straight inside your IDE. ViewModel 2017 Honestly, this part (I mean exactly ViewModel's version of 2017) can be unnecessary, because Medium has several articles, that describes viewModel saving state mechanism in first version. I like this one. But I suggest you more code than there. First of all let's take a look at ViewModel class itself. According to official documentation: The ViewModel class allows data to survive configuration changes such as screen rotations. It can lead to research this class. https://medium.com/media/3966f6a014283670bd0d0430100902cd/href It is just simple abstract class. Without any secrets. With one empty method. Can documentation be wrong (or obsolete) so long time? This question is not so obvious. From one side, if you will create your child viewModel and initialize it using constructor, in this case saving states mechanism will not work. But if you are doing everything in the right way (using special initial

## How lambdas work in Kotlin. setOnClickListener transformation (KAD 18)

DevFeed: [How lambdas work in Kotlin. setOnClickListener transformation (KAD 18)](<https://devfeed.tech/articles/how-lambdas-work-in-kotlin-setonclicklistener-transformation-kad-18-27190.md>)

Original publisher: [Read original article](<https://antonioleiva.com/lambdas-kotlin-android>)

Published: 2017-03-28T00:00:00Z

Content type: tutorial

Language: en

Sources: [Antonio Leiva](<https://devfeed.tech/sources/antonio-leiva.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Framework](<https://devfeed.tech/topics/framework.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-framework](<https://devfeed.tech/tags/android-framework.md>), [examples](<https://devfeed.tech/tags/examples.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [transformation](<https://devfeed.tech/tags/transformation.md>), [ui-components](<https://devfeed.tech/tags/ui-components.md>)

### AI overview

A tutorial explaining how Kotlin lambdas simplify single-method Java interfaces, with examples focused on Android's setOnClickListener and view handling. It covers anonymous-class transformations, trailing lambdas, omitted parameters, the it keyword, and Kotlin DSL-style code.

### Source excerpt

Everything Android, Kotlin and other random topics

## Extension functions in Kotlin: Extend the Android Framework (KAD 08)

DevFeed: [Extension functions in Kotlin: Extend the Android Framework (KAD 08)](<https://devfeed.tech/articles/extension-functions-in-kotlin-extend-the-android-framework-kad-08-27162.md>)

Original publisher: [Read original article](<https://antonioleiva.com/extension-functions-kotlin>)

Published: 2017-01-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Antonio Leiva](<https://devfeed.tech/sources/antonio-leiva.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Extension](<https://devfeed.tech/topics/extension.md>), [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-framework](<https://devfeed.tech/tags/android-framework.md>), [code](<https://devfeed.tech/tags/code.md>), [examples](<https://devfeed.tech/tags/examples.md>), [extension](<https://devfeed.tech/tags/extension.md>), [extension-function](<https://devfeed.tech/tags/extension-function.md>), [framework](<https://devfeed.tech/tags/framework.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [library](<https://devfeed.tech/tags/library.md>), [picasso](<https://devfeed.tech/tags/picasso.md>)

### AI overview

A tutorial explaining Kotlin extension functions and extension properties, with Android examples for views, Toasts, adapter view inflation, and Picasso image loading. It describes how extensions add functionality to existing classes without modifying their code and notes that extension properties cannot store state.

### Source excerpt

Everything Android, Kotlin and other random topics

## Kotlin integrations with Android SDK (KAD 05)

DevFeed: [Kotlin integrations with Android SDK (KAD 05)](<https://devfeed.tech/articles/kotlin-integrations-with-android-sdk-kad-05-27186.md>)

Original publisher: [Read original article](<https://antonioleiva.com/kotlin-integrations-android-sdk>)

Published: 2016-12-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [Antonio Leiva](<https://devfeed.tech/sources/antonio-leiva.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [SDK](<https://devfeed.tech/topics/sdk.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-framework](<https://devfeed.tech/tags/android-framework.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [sdk](<https://devfeed.tech/tags/sdk.md>)

### AI overview

A tutorial explaining how Kotlin integrates with the Android SDK and Java-based Android framework. It covers mapping Java getters and setters to Kotlin properties and converting single-method interfaces into lambdas, while noting that property access still uses the original getters and setters.

### Source excerpt

Everything Android, Kotlin and other random topics

## Using Custom Compound Views in Android

DevFeed: [Using Custom Compound Views in Android](<https://devfeed.tech/articles/using-custom-compound-views-in-android-30569.md>)

Original publisher: [Read original article](<https://ryanharter.com/blog/2014/05/using-custom-compound-views-in-android/>)

Published: 2014-05-14T07:00:00Z

Content type: tutorial

Language: en

Sources: [Blogs on Ryan Harter](<https://devfeed.tech/sources/blogs-on-ryan-harter.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-framework](<https://devfeed.tech/tags/android-framework.md>), [code](<https://devfeed.tech/tags/code.md>), [components](<https://devfeed.tech/tags/components.md>), [test](<https://devfeed.tech/tags/test.md>)

### AI overview

This tutorial explains how to create reusable custom compound views in Android. It demonstrates encapsulating a variable number of EditText fields in a custom view instead of placing the interaction logic directly in a Fragment, improving reuse and testability.

### Source excerpt

On a recent client app, I ran into a situation where I needed an arbitrary number of EditText fields based on a selected value, where the user could enter people's information. My initial thought was to put this logic in my Fragment, just adding EditTexts to a LinearLayout container as the selected value changes, but that bloated my Fragment, and didn't allow for much reuse. This was a perfect opportunity to encapsulate this interaction functionality in a custom view, which would be reusable throughout the app (required in two places so far), and would allow me to easily test the encapsulated functionality.