From a1bdcf4f06a2e05b7b900c76b8c1ca268d4b2177 Mon Sep 17 00:00:00 2001 From: roel Date: Thu, 16 Jan 2025 02:27:43 +0900 Subject: [PATCH] =?UTF-8?q?[Feat/#36]=20items=20=3D>=20itemsIndexed=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EB=B0=8F=20crossfade=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../placeDetail/component/PlaceDetailImageLazyRow.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/spoony/spoony/presentation/placeDetail/component/PlaceDetailImageLazyRow.kt b/app/src/main/java/com/spoony/spoony/presentation/placeDetail/component/PlaceDetailImageLazyRow.kt index 98d6922b..052360dd 100644 --- a/app/src/main/java/com/spoony/spoony/presentation/placeDetail/component/PlaceDetailImageLazyRow.kt +++ b/app/src/main/java/com/spoony/spoony/presentation/placeDetail/component/PlaceDetailImageLazyRow.kt @@ -5,7 +5,7 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.LazyRow -import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -36,7 +36,7 @@ fun PlaceDetailImageLazyRow( horizontalArrangement = Arrangement.spacedBy(10.dp), contentPadding = PaddingValues(horizontal = 20.dp) ) { - items(imageList) { imageUrl -> + itemsIndexed(imageList, key = { index, _ -> index }) { _, imageUrl -> AsyncImage( modifier = Modifier .size(imageSize) @@ -46,6 +46,7 @@ fun PlaceDetailImageLazyRow( if (isBlurred) Modifier.blur(24.dp) else Modifier ), model = ImageRequest.Builder(context) + .crossfade(true) .data(imageUrl) .build(), contentScale = ContentScale.Crop,