This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@OptIn(ExperimentalLayoutApi::class) | |
@Composable | |
fun ContextualFlowRowLayout(modifier: Modifier = Modifier) { | |
val techStacks = listOf( | |
"Kotlin", | |
"Jetpack Compose", | |
"Java", | |
"Rust", | |
"Go", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val listState = rememberScalingLazyListState() | |
val list: List<String> = | |
listOf("Kotlin", "Jetpack Compose", "Android", "Kotlin Notebook", "KMP", "CMP", "Koin") | |
Column(Modifier.fillMaxSize()) { | |
ScalingLazyColumn( | |
state = listState, | |
scalingParams = ScalingLazyColumnDefaults.scalingParams( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CircularProgressIndicator( | |
progress = .7f, | |
modifier = Modifier | |
.fillMaxSize() | |
.padding(all = 1.dp), | |
startAngle = 295.5f, | |
endAngle = 245.5f, | |
indicatorColor = MaterialTheme.colors.secondary, | |
trackColor = MaterialTheme.colors.onBackground.copy(alpha = 0.1f), | |
strokeWidth = 6.dp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Column( | |
modifier = Modifier.padding(8.dp) | |
) { | |
TitleCard( | |
onClick = {}, | |
title = { Text("Workout") }, | |
contentColor = MaterialTheme.colors.onSurface, | |
titleColor = MaterialTheme.colors.onSurface | |
) { | |
Text("1 Hour 32 mins") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun SliderExample() { | |
var value by remember { mutableFloatStateOf(4f) } | |
Column( | |
Modifier.fillMaxSize(), | |
horizontalAlignment = Alignment.CenterHorizontally, | |
verticalArrangement = Arrangement.Center | |
) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun SteppersExample() { | |
var value by remember { mutableIntStateOf(2) } | |
Column( | |
Modifier.fillMaxSize(), | |
horizontalAlignment = Alignment.CenterHorizontally, | |
verticalArrangement = Arrangement.Center | |
) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun ToggleChipExample() { | |
var checked by remember { mutableStateOf(true) } | |
ToggleChip( | |
modifier = Modifier.fillMaxWidth(), | |
label = { | |
Text("Dark Mode") | |
}, | |
checked = checked, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun ChipExample2() { | |
Chip( | |
onClick = { /*TODO*/ }, | |
label = { | |
Text(text = "Bengaluru") | |
}, | |
secondaryLabel = { | |
Text(text = "32 °C") | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun ChipExample() { | |
Chip( | |
onClick = { /*TODO*/ }, | |
label = { | |
Text(text = "Tools") | |
}, | |
icon = { | |
Icon( | |
painter = painterResource(id = R.drawable.tools), |
NewerOlder