# material-components

Material Components are modular, customizable code-backed UI components for implementing Material Design across platforms, including Android, iOS, web, and Flutter.

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

## Intro to Compose - Live code

DevFeed: [Intro to Compose - Live code](<https://devfeed.tech/articles/intro-to-compose-live-code-32061.md>)

Original publisher: [Read original article](<https://www.maiatoday.net/p/intro-to-compose-live-code/>)

Published: 2022-02-16T18:51:01Z

Content type: tutorial

Language: en

Sources: [maiatoday](<https://devfeed.tech/sources/maiatoday.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [material-components](<https://devfeed.tech/topics/material-components.md>)

Tags: [animation](<https://devfeed.tech/tags/animation.md>), [code](<https://devfeed.tech/tags/code.md>), [components](<https://devfeed.tech/tags/components.md>), [compose](<https://devfeed.tech/tags/compose.md>), [demo](<https://devfeed.tech/tags/demo.md>), [framework](<https://devfeed.tech/tags/framework.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [live](<https://devfeed.tech/tags/live.md>), [live-code](<https://devfeed.tech/tags/live-code.md>), [material-components](<https://devfeed.tech/tags/material-components.md>)

### AI overview

An introductory Jetpack Compose session combines a broad overview with a live coding demonstration covering basic usage, Material components, and a small animation. It also summarizes what is new in Jetpack Compose 1.1.

### Source excerpt

A broad strokes intro to Jetpack Compose followed by a live code demo taster of what it is like to use this framework. The demo ranges from basic use, a bit of Material components and one small animation. Hosted by DevUG. In the second part of the event, Thomas gives us a summary of what's new in Jetpack Compose 1.1 Slides

## Material Theming with MDC: Type

DevFeed: [Material Theming with MDC: Type](<https://devfeed.tech/articles/material-theming-with-mdc-type-25990.md>)

Original publisher: [Read original article](<https://medium.com/androiddevelopers/material-theming-with-mdc-type-8c2013430247?source=rss-37290b859aca------2>)

Author: Nick Rout

Published: 2020-08-25T16:03:24Z

Content type: tutorial

Language: en

Sources: [Stories by Nick Rout on Medium](<https://devfeed.tech/sources/stories-by-nick-rout-on-medium.md>)

Topics: [material-components](<https://devfeed.tech/topics/material-components.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>), [Android](<https://devfeed.tech/topics/android.md>), [Library](<https://devfeed.tech/topics/library.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [components](<https://devfeed.tech/tags/components.md>), [design](<https://devfeed.tech/tags/design.md>), [material-components](<https://devfeed.tech/tags/material-components.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [material-theming](<https://devfeed.tech/tags/material-theming.md>), [migration-guide](<https://devfeed.tech/tags/migration-guide.md>), [typography](<https://devfeed.tech/tags/typography.md>), [usability](<https://devfeed.tech/tags/usability.md>)

### AI overview

This tutorial explains type theming for Android apps using the Material Components (MDC) library. It describes Material Design's 13 type styles, their baseline properties, how MDC type attributes style widget text, and how to select type styles for different interface elements.

### Source excerpt

Type theming on Android using the MDC library This article is also posted on the Material Design blog. Material Theming is a way to customize Material Components to align with your brand. A Material theme includes color, typography and shape parameters which you can adjust to get near-infinite variations of the components -- all while maintaining their core anatomy and usability. On Android, Material Theming can be implemented using the Material Components (MDC) library, from version 1.1.0 onwards. If you're looking to migrate from the Design Support Library or MDC 1.0.0, take a look at our migration guide. Migrating to Material Components for Android This article will be focusing on type theming. Type attributes Material Design provides 13 type "styles" that are applied to all the text in your app. Each of these have a design term (eg. "Body 1") along with a corresponding type attribute that can be overridden in your app theme (eg. textAppearanceBody1). There are default "baseline" values (text size, letter spacing, capitalization, etc.) for each style. MDC type attributes with baseline styling Material Components use these type attributes to style textual elements of the widgets (those parts that subclass or comprise one or more TextViews). Type attributes used by a button They are applied with eg. android:textAppearance="?attr/textAppearanceBody1" in layouts and widget styles. Take a look at Nick Butcher's "What's your text's appearance?" article for more information on using this and the order of precedence with other styling techniques. What's your text's appearance? In the MDC themes these attributes map to styles, eg. <style name="Theme.MaterialComponents.*" parent="..."> ... <item name="textAppearanceBody1"> @style/TextAppearance.MaterialComponents.Body1 </item> <style /> You might recognize TextAppearance styles from AppCompat or the platform and these are discussed in more detail in the Type resources section below. The corresponding attributes are new to M

## Material Theming with MDC: Shape

DevFeed: [Material Theming with MDC: Shape](<https://devfeed.tech/articles/material-theming-with-mdc-shape-25989.md>)

Original publisher: [Read original article](<https://medium.com/androiddevelopers/material-theming-with-mdc-shape-126c4e5cd7b4?source=rss-37290b859aca------2>)

Author: Nick Rout

Published: 2020-08-25T16:03:04Z

Content type: tutorial

Language: en

Sources: [Stories by Nick Rout on Medium](<https://devfeed.tech/sources/stories-by-nick-rout-on-medium.md>)

Topics: [Material Design](<https://devfeed.tech/topics/material-design.md>), [material-components](<https://devfeed.tech/topics/material-components.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [components](<https://devfeed.tech/tags/components.md>), [design](<https://devfeed.tech/tags/design.md>), [material-components](<https://devfeed.tech/tags/material-components.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [material-theming](<https://devfeed.tech/tags/material-theming.md>), [usability](<https://devfeed.tech/tags/usability.md>)

### AI overview

This tutorial explains shape theming for Material Components on Android. It describes how shape categories and attributes customize widget backgrounds and how shape can influence attention, interaction cues, and visual distinction.

### Source excerpt

Shape theming on Android using the MDC library This article is also posted on the Material Design blog. Material Theming is a way to customize Material Components to align with your brand. A Material theme includes color, typography and shape parameters which you can adjust to get near-infinite variations of the components -- all while maintaining their core anatomy and usability. On Android, Material Theming can be implemented using the Material Components (MDC) library, from version 1.1.0 onwards. If you're looking to migrate from the Design Support Library or MDC 1.0.0, take a look at our migration guide. Migrating to Material Components for Android This article will be focusing on shape theming. Most widgets have a background shape, but have you ever thought about the ways that shape influences user behavior? Just like color and typography, shape can guide a user's attention, suggest interaction, and visually distinguish elements in your UI. Material's shape theming gives you the ability to define global shape values that change the style of components across your app -- for example, giving all your cards, dialogs, and menus really friendly rounded corners. Shape attributes Material Design provides 3 shape "categories" that are applied to the shapeable widgets of your app. Each of these have a design term (eg. "Small components") along with a corresponding shape attribute that can be overridden in your app theme (eg. shapeAppearanceSmallComponent). There are default "baseline" values (corner size, corner family, etc.) for each category. MDC shape attributes with baseline values Material Components use these shape attributes to style backgrounds of the widgets. Shape attributes used by a button They are applied with eg. app:shapeAppearance="?attr/shapeAppearanceSmallComponent" in layouts and widget styles. In the MDC themes these attributes map to styles, eg. <style name="Theme.MaterialComponents.*" parent="..."> ... <item name="shapeAppearanceMediumComponent"> @st

## Material Theming with MDC: Color

DevFeed: [Material Theming with MDC: Color](<https://devfeed.tech/articles/material-theming-with-mdc-color-25988.md>)

Original publisher: [Read original article](<https://medium.com/androiddevelopers/material-theming-with-mdc-color-860dbba8ce2f?source=rss-37290b859aca------2>)

Author: Nick Rout

Published: 2020-08-25T16:02:38Z

Content type: tutorial

Language: en

Sources: [Stories by Nick Rout on Medium](<https://devfeed.tech/sources/stories-by-nick-rout-on-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>), [material-components](<https://devfeed.tech/topics/material-components.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>), [Accessibility](<https://devfeed.tech/topics/accessibility.md>), [Dark Mode](<https://devfeed.tech/topics/dark-mode.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [android](<https://devfeed.tech/tags/android.md>), [components](<https://devfeed.tech/tags/components.md>), [design](<https://devfeed.tech/tags/design.md>), [mad-skills](<https://devfeed.tech/tags/mad-skills.md>), [material-components](<https://devfeed.tech/tags/material-components.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [material-theming](<https://devfeed.tech/tags/material-theming.md>), [migration](<https://devfeed.tech/tags/migration.md>), [usability](<https://devfeed.tech/tags/usability.md>)

### AI overview

This tutorial explains color theming for Android applications with the Material Components library. It describes Material Design color slots, baseline light and dark themes, color attributes used to tint widgets, accessibility and contrast requirements, and tools for selecting and previewing color variants.

### Source excerpt

Color theming on Android using the MDC library This article is also posted on the Material Design blog. Material Theming is a way to customize Material Components to align with your brand. A Material theme includes color, typography and shape parameters which you can adjust to get near-infinite variations of the components -- all while maintaining their core anatomy and usability. On Android, Material Theming can be implemented using the Material Components (MDC) library, from version 1.1.0 onwards. If you're looking to migrate from the Design Support Library or MDC 1.0.0, take a look at our migration guide. Migrating to Material Components for Android This article will be focusing on color theming. Color attributes Material Design provides 12 color "slots" that make up the overall palette of your app. Each of these have a design term (eg. "Primary") along with a corresponding color attribute that can be overridden in your app theme (eg. colorPrimary). There are default "baseline" values for both your light theme and dark theme. MDC color attributes with light baseline valuesMDC color attributes with dark baseline values Material Components use these color attributes to tint elements of the widgets. Color attributes used by a button They are applied with eg. app:backgroundTint="?attr/colorSecondary" in layouts and widget styles. You might recognise some of these color attributes like colorPrimary. That's because a few of them are inherited from AppCompat and the platform, while the rest have been newly introduced by MDC. The table below illustrates the origin of each attribute. https://medium.com/media/913ab7a828a11fee6cf9fb333df54f3a/hrefPicking colors Figuring out which color values to use for each slot may be the responsibility of a designer, or derived from your product's brand. However, it's still useful to know about the role of each color, the relationship between them, and how to meet accessibility requirements: colorPrimary and colorSecondary represent the c

## Why We Recommend Material Components for Android

DevFeed: [Why We Recommend Material Components for Android](<https://devfeed.tech/articles/why-we-recommend-material-components-for-android-29325.md>)

Original publisher: [Read original article](<https://material.io/blog/why-we-recommend-material-design-components-android>)

Published: 2020-08-25T13:00:00Z

Content type: article

Language: en

Sources: [Material.io - Material Design](<https://devfeed.tech/sources/material-io-material-design.md>)

Topics: [material-components](<https://devfeed.tech/topics/material-components.md>), [Android](<https://devfeed.tech/topics/android.md>)

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

### AI overview

The article recommends Material Components for Android and discusses ensuring that patterns learned in one app can be used in another.

### Source excerpt

Ensuring that patterns learned in one app can be used in another

## Material Components for Android 1.2.0

DevFeed: [Material Components for Android 1.2.0](<https://devfeed.tech/articles/material-components-for-android-1-2-0-29226.md>)

Original publisher: [Read original article](<https://material.io/blog/android-stable-release-1-2>)

Published: 2020-08-04T13:00:00Z

Content type: release

Language: en

Sources: [Material.io - Material Design](<https://devfeed.tech/sources/material-io-material-design.md>)

Topics: [material-components](<https://devfeed.tech/topics/material-components.md>), [Android](<https://devfeed.tech/topics/android.md>)

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

### AI overview

This release article announces Material Components for Android 1.2.0 and highlights the Material motion system, Sliders, and ShapeableImageView.

### Source excerpt

Material motion system, Sliders, ShapeableImageView, and more

## Migrating to Material Components for Android

DevFeed: [Migrating to Material Components for Android](<https://devfeed.tech/articles/migrating-to-material-components-for-android-25991.md>)

Original publisher: [Read original article](<https://medium.com/androiddevelopers/migrating-to-material-components-for-android-ec6757795351?source=rss-37290b859aca------2>)

Author: Nick Rout

Published: 2020-04-16T14:59:37Z

Content type: tutorial

Language: en

Sources: [Stories by Nick Rout on Medium](<https://devfeed.tech/sources/stories-by-nick-rout-on-medium.md>)

Topics: [material-components](<https://devfeed.tech/topics/material-components.md>), [migration](<https://devfeed.tech/topics/migration.md>), [Android](<https://devfeed.tech/topics/android.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-jetpack](<https://devfeed.tech/tags/android-jetpack.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [design](<https://devfeed.tech/tags/design.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [material-components](<https://devfeed.tech/tags/material-components.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [material-theming](<https://devfeed.tech/tags/material-theming.md>), [migration](<https://devfeed.tech/tags/migration.md>)

### AI overview

A migration guide for Android developers moving from the Design Support Library to Material Components for Android. It explains the required AndroidX and Jetpack migration, dependency and package updates, and theme changes needed to adopt Material Components features.

### Source excerpt

Illustration by Molly HensleyFrom Design Support Library 👉 MDC 1.0.0 👉 MDC 1.1.0 and beyond This article is also posted on the Material Design blog. We recently announced Material Design Components (MDC) 1.1.0 -- a library update that brings Material Theming, new widgets, dark theme support and other exciting features to your Android app. MDC replaces the Design Support Library. This guide will show you how to migrate your codebase so you can make use of the new attributes, styles, and widgets. If you're on MDC 1.0.0 this also provides the necessary migration steps to 1.1.0. Be sure to check out our corresponding video guide as well! https://medium.com/media/dc50384c37815c26247f879e8c76d769/hrefA simplified theming example This guide uses a simplified app to demonstrate the migration process. It uses an AppCompat theme, widgets from the Design Support Library (including a button with a custom background), and various other elements that require migration. We'll start with an app theme which uses the traditional AppCompat template: https://medium.com/media/23a6299512d5244e61f40df7ee9513a9/hrefExample app using AppCompat and the Design Support LibraryMigrating from the Support Library to Jetpack Before you can use MDC, you need to migrate from the Support Library to Android Jetpack. Jetpack uses the new androidx.* namespace and splits the previous Support Library packages into separately maintained, semantically versioned libraries, providing feature parity as well as new libraries. MDC is built with AndroidX libraries so migration is mandatory. To migrate to AndroidX, we recommend following the official developer documentation or watching the "Migrating to AndroidX: The time is right" talk from Android Dev Summit '19. The 'Refactor > Migrate to AndroidX' tool in Android Studio will refactor your Design Support Library dependency to MDC. Note: Jetpack and MDC artifacts with version 1.0.0 are binary compatible with the Support Library 28.0.0 artifacts. If you're not on

## Migrating to Material Components for Android

DevFeed: [Migrating to Material Components for Android](<https://devfeed.tech/articles/migrating-to-material-components-for-android-29304.md>)

Original publisher: [Read original article](<https://material.io/blog/migrate-android-material-components>)

Published: 2020-04-16T13:00:00Z

Content type: tutorial

Language: en

Sources: [Material.io - Material Design](<https://devfeed.tech/sources/material-io-material-design.md>)

Topics: [material-components](<https://devfeed.tech/topics/material-components.md>), [Android](<https://devfeed.tech/topics/android.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [library](<https://devfeed.tech/tags/library.md>), [material-components](<https://devfeed.tech/tags/material-components.md>)

### AI overview

A migration guide for moving Android projects from the Design Support Library to Material Components, including MDC 1.0.0 and MDC 1.1.0 and later.

### Source excerpt

From Design Support Library 👉 MDC 1.0.0 👉 MDC 1.1.0 and beyond

## Material Components for Android 1.1.0 is now available

DevFeed: [Material Components for Android 1.1.0 is now available](<https://devfeed.tech/articles/material-components-for-android-1-1-0-is-now-available-25993.md>)

Original publisher: [Read original article](<https://medium.com/google-design/material-design-components-for-android-1-1-0-are-now-available-45e1d576037c?source=rss-37290b859aca------2>)

Author: Nick Rout

Published: 2020-02-12T18:20:44Z

Content type: release

Language: en

Sources: [Stories by Nick Rout on Medium](<https://devfeed.tech/sources/stories-by-nick-rout-on-medium.md>)

Topics: [releases](<https://devfeed.tech/topics/releases.md>), [material-components](<https://devfeed.tech/topics/material-components.md>), [Android](<https://devfeed.tech/topics/android.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>), [Accessibility](<https://devfeed.tech/topics/accessibility.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [bug-fixes](<https://devfeed.tech/tags/bug-fixes.md>), [material-components](<https://devfeed.tech/tags/material-components.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [material-theming](<https://devfeed.tech/tags/material-theming.md>), [new-features](<https://devfeed.tech/tags/new-features.md>), [release-notes](<https://devfeed.tech/tags/release-notes.md>), [releases](<https://devfeed.tech/tags/releases.md>), [themes](<https://devfeed.tech/tags/themes.md>)

### AI overview

Material Components for Android (MDC-Android) 1.1.0 is officially available. The release adds new components, Material Theming support, dark theme support, updated component styling, bug fixes, and accessibility improvements.

### Source excerpt

Material Theming, new components, dark theme support, and more We're excited to announce the release of Material Components for Android (MDC-Android) 1.1.0! A host of exciting new features have been added along with many bug fixes and accessibility improvements. Get the rundown below. Be sure to check out the release notes. If you're using MDC for the first time, also take a look at our getting started guide. A brief background on MDC Material Components for Android (MDC) evolved from the Design Support Library. The initial 1.0.0 release was binary-equivalent with 28.0.0 and mainly served as the android.support.design to com.google.android.material namespace change. Since then, the Material Design specification has evolved. New principles, guidelines, and components have emerged to better represent brands while maintaining the core principles of Material. The purpose of MDC is to provide developers with a library that implements these components and guidelines in code. As guidelines continue to change over time, MDC will adapt and make updates to meet the latest specs. This library allows designers and developers to share a common system and build delightful experiences for their brand, faster. Take a look at our guide that helps you migrate your codebase from the Design Support Library to MDC: Migrating to Material Components for Android What's new in 1.1.0? A lot has changed in MDC since 1.0.0! The things you loved from the alpha, beta, and RC releases of 1.1.0 are now officially stable. If you haven't yet started using version 1.1.0 of MDC, there has never been a better time to migrate. Material Theming Material Theming allows you to customize Material Design to better reflect your brand. Color, typography and shape choices provide common properties between design and development enabling near-infinite design expression. MDC 1.1.0 enables Material Theming in your Android app. All components support adjusting their color, typography, and shape through themes, styl

## Hands-on with Material Components for Android: Selection Controls

DevFeed: [Hands-on with Material Components for Android: Selection Controls](<https://devfeed.tech/articles/hands-on-with-material-components-for-android-selection-controls-25995.md>)

Original publisher: [Read original article](<https://medium.com/over-engineering/hands-on-with-material-components-for-android-selection-controls-a2cf17ea4473?source=rss-37290b859aca------2>)

Author: Nick Rout

Published: 2019-08-26T14:11:24Z

Content type: tutorial

Language: en

Sources: [Stories by Nick Rout on Medium](<https://devfeed.tech/sources/stories-by-nick-rout-on-medium.md>)

Topics: [material-components](<https://devfeed.tech/topics/material-components.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [apis](<https://devfeed.tech/tags/apis.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [layout](<https://devfeed.tech/tags/layout.md>), [material-components](<https://devfeed.tech/tags/material-components.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [material-theming](<https://devfeed.tech/tags/material-theming.md>)

### AI overview

A practical tutorial on Material Components for Android selection controls. It explains the use, behavior, grouping, APIs, and theming of radio buttons, checkboxes, and switches, with layout examples and references to Gradle setup and app themes.

### Source excerpt

Part 8 of a series covering practical usage of Material Components for Android This post will be covering the features and APIs of Radio Button, Checkbox and Switch components. To find out how to handle initial setup of Material Components for Android (including the Gradle dependency and creating an app theme), please see my original post: Setting up a Material Components theme for Android Selection Controls are small components for scenarios in which users need to select options or toggle settings. They are typically found on settings screens and dialogs. From a design perspective, there are three main types of selection controls which can be used in different scenarios: Radio Buttons: A circular control with two possible states; selected or unselected. Has single-select behavior when in a group of other radio buttons (i.e. Only one control can be selected at a time). Checkboxes: A square control with two possible states; checked or unchecked. Has multi-select behavior when in a group of other checkboxes (i.e. Multiple controls can be selected at a time). Switches: A control consisting of a thumb and a track. Has two possible states; on or off. Basic usage 🏁 A MaterialRadioButton, MaterialCheckBox or SwitchMaterial can be included in your layout like so: <LinearLayout ...> <com.google.android.material.radiobutton.MaterialRadioButton android:id="@+id/radioButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Radio Button" /> <com.google.android.material.checkbox.MaterialCheckBox android:id="@+id/checkbox" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Checkbox" /> <!-- Note: ID cannot be 'switch' as this is a Java keyword --> <com.google.android.material.switchmaterial.SwitchMaterial android:id="@+id/switchMaterial" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Switch" /> </LinearLayout>Setting and listening for checks 👂 All of the selection cont

## Hands-on with Material Components for Android: Dialogs

DevFeed: [Hands-on with Material Components for Android: Dialogs](<https://devfeed.tech/articles/hands-on-with-material-components-for-android-dialogs-25994.md>)

Original publisher: [Read original article](<https://medium.com/over-engineering/hands-on-with-material-components-for-android-dialogs-75c6d726f83a?source=rss-37290b859aca------2>)

Author: Nick Rout

Published: 2019-07-29T14:00:13Z

Content type: tutorial

Language: en

Sources: [Stories by Nick Rout on Medium](<https://devfeed.tech/sources/stories-by-nick-rout-on-medium.md>)

Topics: [dialog](<https://devfeed.tech/topics/dialog.md>), [Android](<https://devfeed.tech/topics/android.md>), [material-components](<https://devfeed.tech/topics/material-components.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [dialog](<https://devfeed.tech/tags/dialog.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [material-components](<https://devfeed.tech/tags/material-components.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [material-theming](<https://devfeed.tech/tags/material-theming.md>)

### AI overview

A practical guide to Material Components for Android dialogs. It explains alert, simple, confirmation, and full-screen dialog types, their shared characteristics, basic implementation with MaterialAlertDialogBuilder, configuration-change behavior, and customization options.

### Source excerpt

Part 7 of a series covering practical usage of Material Components for Android This post will be covering the features and API of Dialog components. To find out how to handle initial setup of Material Components for Android (including the Gradle dependency and creating an app theme), please see my original post: Setting up a Material Components theme for Android Dialogs are components, typically with modal windows, that are displayed in front of app content. They are used to inform users about a task that may contain critical information and/or require a decision. They purposefully interrupt the current flow and remain on screen until dismissed or action has been taken, so they should be used sparingly. From a design perspective, there are three main types of dialogs which can be used in different scenarios: Alert dialog: The simplest of dialogs, despite the name. Used to interrupt a user with urgent information that typically requires user action/confirmation. Characterized by a title, optional supporting text and action buttons. Simple dialog: Used to present the user with a list of actions that, when tapped, take immediate effect. Should not contain action buttons. Confirmation dialog: Used to present a list of single- or multi-select choices to a user. Action buttons serve to confirm the choice(s). All of the above share common characteristics: a background scrim that obscures app content (which can be optionally tapped to dismiss the dialog) and a surface container. Note: A fourth type exists: Full screen dialog. To implement this, the official documentation recommends using a DialogFragment along with resource qualifiers to determine how it is presented. This is outside the scope of this article and won't be covered. Basic usage 🏁 All of the aforementioned dialog types can be implemented using MaterialAlertDialogBuilder. This builder class configures and instantiates an AlertDialog with Material Design specifications and theming. The basic method of showing a