Function

background

Apply a background color to the element this modifier is attached to.

background

Source set: Android
public fun GlanceModifier.background(day: Color, night: Color): GlanceModifier

Apply a background color to the element this modifier is attached to. This will cause the element to paint the specified Color as its background, choosing day or night depending on the device configuration, which will fill the bounds of the element.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: