Compose - Exercise 3
Material Design
MaterialTheme1
theme
MaterialTheme.colors.primaryVariant
MaterialTheme.typography.subtitle1
MaterialTheme.typography.h4.copy(
Scaffold
scaffold - rememebr coroutine
OutlinedButton
image.painterResource
Button(
onClick = { /* ... */ },
// Uses ButtonDefaults.ContentPadding by default
contentPadding = PaddingValues(
start = 20.dp,
top = 12.dp,
end = 20.dp,
bottom = 12.dp
)
) {
// Inner content including an icon and a text label
Icon(
Icons.Filled.Favorite,
contentDescription = "Favorite",
modifier = Modifier.size(ButtonDefaults.IconSize)
)
Spacer(Modifier.size(ButtonDefaults.IconSpacing))
Text("Like")
}
val drawerState = rememberDrawerState(DrawerValue.Closed)
Last updated
Was this helpful?