chanjungskim
12/08/2022, 5:29 AMchanjungskim
12/08/2022, 5:29 AMLazyColumn(
modifier = Modifier
.fillMaxSize()
.padding(
top = 12.dp,
start = 12.dp,
end = 12.dp,
bottom = 12.dp
)
) {
item{
Column {
EventBanner(
modifier = Modifier
.background(Color.White)
.fillMaxWidth()
.align(Alignment.CenterHorizontally)
.aspectRatio(1.2f)
.clip(RoundedCornerShape(8.dp)),
activeIndicatorColor = Color(0xFF0599FF),
inActiveIndicatorColor = Color(0x55888888),
indicatorSize = 10,
eventItems = eventList
)
}
}
item{
Spacer(
modifier = Modifier
.fillMaxWidth()
.height(12.dp)
)
}
item {
LazyVerticalGrid(
columns = GridCells.Adaptive(minSize = 128.dp)
) {
items(supplements) { supplement ->
SupplementItem(supplement)
}
}
}
}
@Composable
fun SupplementItem(supplement: SupplementData.Supplement) {
Column {
AsyncImage(
modifier = Modifier
.width(97.dp)
.height(81.dp),
model = supplement.imageUrl,
contentDescription = supplement.name,
contentScale = ContentScale.Crop
)
Text(text = supplement.brand)
Text(text = supplement.name)
}
}
chanjungskim
12/08/2022, 5:43 AMLazyVerticalGrid
scrollable. but fixed. And entire screen only should be scrollable. How can I solve this problem?????Daniel Okanin
12/08/2022, 9:51 AM