Skip to content

Commit

Permalink
[Feat/#36] items => itemsIndexed 수정 및 crossfade 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Roel4990 committed Jan 15, 2025
1 parent 40fb236 commit a1bdcf4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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,
Expand Down

0 comments on commit a1bdcf4

Please sign in to comment.