Skip to content

Commit

Permalink
Merge pull request #4 from skydoves/improve/shimmering
Browse files Browse the repository at this point in the history
Implement shimmering effect for images
  • Loading branch information
skydoves authored Sep 5, 2024
2 parents a068449 + d8d21e3 commit 0dfe3a9
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.skydoves.landscapist.ImageOptions
import com.skydoves.landscapist.components.rememberImageComponent
import com.skydoves.landscapist.glide.GlideImage
import com.skydoves.landscapist.placeholder.shimmer.Shimmer
import com.skydoves.landscapist.placeholder.shimmer.ShimmerPlugin
import io.getstream.server.driven.core.designsystem.R
import io.getstream.server.driven.core.designsystem.extension.size
import io.getstream.server.driven.core.designsystem.preview.MockUtils
Expand Down Expand Up @@ -72,6 +75,14 @@ fun ConsumeImageUi(
contentScale = imageUi.scaleType.toContentScale(),
contentDescription = imageUi.title
),
component = rememberImageComponent {
+ShimmerPlugin(
Shimmer.Resonate(
baseColor = ServerDrivenTheme.colors.shimmerBase,
highlightColor = ServerDrivenTheme.colors.shimmerHighlight
)
)
},
previewPlaceholder = painterResource(R.drawable.preview)
)
}
Expand Down

0 comments on commit 0dfe3a9

Please sign in to comment.