Skip to content

Commit

Permalink
Add crossface transition to images after loading
Browse files Browse the repository at this point in the history
  • Loading branch information
fakeyatogod committed Sep 3, 2023
1 parent d770b94 commit 06f2ab3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,15 @@ class AnimeFragment : Fragment() {

// load background image.
binding.backgroundImage.load(animeDetails.animeCover, imageLoader) {
crossfade(true)
placeholder(ShimmerDrawable().apply {
setShimmer(shimmer)
})
error(R.drawable.ic_broken_image)
}
// load cover image.
binding.coverAnime.load(animeDetails.animeCover, imageLoader) {
crossfade(true)
placeholder(ShimmerDrawable().apply {
setShimmer(shimmer)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ fun ImageView.setImage(url: String?) {
.build()
if (!url.isNullOrEmpty())
load(url, imageLoader) {
crossfade(true)
placeholder(ShimmerDrawable().apply {
setShimmer(shimmer)
})
Expand Down

0 comments on commit 06f2ab3

Please sign in to comment.