Skip to content

Package-level declarations

Properties

Name

Summary

LocalGlanceIconTint

Android

The default icon tint for Glance (a ColorProvider) used when none is provided as a parameter of one of the FontIcon functions.

Functions

Name

Summary

FontIcon

Android

kotlin
@Composable
fun FontIcon(icon: Char, contentDescription: String?, modifier: GlanceModifier = GlanceModifier, size: Dp = LocalIconSize.current, tint: ColorProvider = LocalGlanceIconTint.current, weight: FontWeight = LocalIconWeight.current, iconFont: IconFont = LocalIconFont.current)

A component that draws the icon using iconFont (with a default value of LocalIconFont). The icon will be size × size dp, and will be tinted with tint. If iconFont is a variable font, weight will applied as a variation setting, or else the font with the nearest weight will be picked.

kotlin
@Composable
fun FontIcon(iconName: String, contentDescription: String?, modifier: GlanceModifier = GlanceModifier, size: Dp = LocalIconSize.current, tint: ColorProvider = LocalGlanceIconTint.current, weight: FontWeight = LocalIconWeight.current, iconFont: IconFont = LocalIconFont.current)

A component that draws the icon iconName using iconFont (with a default value of LocalIconFont). The icon will be size × size dp, and will be tinted with tint. If iconFont is a variable font, weight will applied as a variation setting, or else the font with the nearest weight will be picked.

ProvideGlanceIconParameters

Android

kotlin
@Composable
fun ProvideGlanceIconParameters(iconFont: IconFont = LocalIconFont.current, size: Dp = LocalIconSize.current, tint: ColorProvider = LocalGlanceIconTint.current, weight: FontWeight = LocalIconWeight.current, content: @Composable () -> Unit)

A shortcut method to set default values for the Glance FontIcon composables. Might be better to use CompositionLocalProvider if it's for setting only one of the default values.