Ink
04/28/2022, 10:04 PMHirozontalPager()
It always displays the same photo.
product.photos
is a List<String> with different links to photos.HorizontalPager(
count = product.photos.size,
state = pagerState,
) {
product.photos.forEach { photoUrl ->
Image(
painter = rememberAsyncImagePainter(photoUrl),
modifier = Modifier
.height(150.dp)
.fillMaxWidth(),
contentScale = ContentScale.Fit,
contentDescription = ""
)
}
}
myanmarking
04/28/2022, 10:08 PMInk
04/28/2022, 10:19 PM