Created
May 9, 2024 20:21
-
-
Save aritra-tech/d4c43f353e39cc18e29a88e05e257ed6 to your computer and use it in GitHub Desktop.
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( | |
edgeScale = 0.5f, | |
minTransitionArea = 0.6f, | |
maxTransitionArea = 0.7f | |
) | |
) { | |
itemsIndexed(items = list) { index, item -> | |
Card( | |
onClick = {}, | |
modifier = Modifier.fillMaxWidth(), | |
contentColor = Color.Black, | |
) { | |
Column( | |
Modifier.fillMaxSize(), | |
horizontalAlignment = Alignment.CenterHorizontally, | |
verticalArrangement = Arrangement.Center | |
) { | |
Text(item, textAlign = TextAlign.Center) | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment