Scaffold
Android
Component in Jetpack Glance
A simple slot api component for displaying widget UI with a [TitleBar]. Sets the background color
to GlanceTheme.colors.surface
and applies padding. This is intended to be used as a top level
component.
Last updated:
Installation
dependencies {
implementation("androidx.glance:glance-appwidget:1.1.1")
}
Overloads
@Composable
fun Scaffold(
modifier: GlanceModifier = GlanceModifier,
titleBar: @Composable (() -> Unit)? = null,
backgroundColor: ColorProvider = GlanceTheme.colors.widgetBackground,
horizontalPadding: Dp = 12.dp,
content: @Composable () -> Unit,
)
Parameters
name | description |
---|---|
modifier | a modifier |
titleBar | A composable that creates the [TitleBar]. Optional parameter. |
backgroundColor | the background color for the layout. |
horizontalPadding | Scaffold provides a default padding which should work for most use cases. However, it can be overridden. |
content | The main content of the widget. |