The second Android 11 Developer Preview is now available, test it out and share your feedback.

Icons

object Icons
kotlin.Any
   ↳ androidx.ui.material.icons.Icons

Entry point for using Material Icons in Compose.

There are five distinct icon themes: Filled, Outlined, Rounded, TwoTone, and Sharp. Each theme contains the same icons, but with a distinct visual style. You should typically choose one theme and use it across your application for consistency. For example, you may want to use a property or a typealias to refer to a specific theme, so it can be accessed in a semantically meaningful way from inside other composables.


//Unresolved: androidx.ui.material.icons.samples.AppIcons

Icons maintain the same names defined by Material, but with their snake_case name converted to PascalCase. For example: add_alarm becomes AddAlarm.

Note: Icons that start with a number, such as 360, are prefixed with a '_', becoming '_360'.

To draw an icon, you can use androidx.ui.foundation.Icon. This component applies tint and provides layout size matching the icon.


//Unresolved: androidx.ui.material.icons.samples.DrawIcon

Summary

Nested classes

Filled icons (previously the only available theme, also known as the baseline theme) are the default icon theme.

Outlined icons make use of a thin stroke and empty space inside for a lighter appearance.

Rounded icons use a corner radius that pairs well with brands that use heavier typography, curved logos, or circular elements to express their style.

Sharp icons display corners with straight edges, for a crisp style that remains legible even at smaller scales.

Two-Tone icons display corners with straight edges, for a crisp style that remains legible even at smaller scales.

Properties

Icons.Filled

Alias for Filled, the baseline icon theme.

Properties

Default

val Default: Icons.Filled

Alias for Filled, the baseline icon theme.