diff --git a/app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt b/app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt index 16f83d4dd..041226de0 100644 --- a/app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt +++ b/app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt @@ -2,9 +2,11 @@ package io.legado.app.ui.audio import android.app.Activity import android.content.Intent +import android.graphics.drawable.Drawable import android.os.Bundle import android.widget.SeekBar import androidx.lifecycle.Observer +import com.bumptech.glide.RequestBuilder import com.bumptech.glide.request.RequestOptions import io.legado.app.R import io.legado.app.base.VMBaseActivity @@ -88,13 +90,17 @@ class AudioPlayActivity : VMBaseActivity(R.layout.activity_a .centerCrop() .into(iv_cover) ImageLoader.load(this, path) - .placeholder(R.drawable.image_cover_default) - .error(R.drawable.image_cover_default) + .thumbnail(defaultCover()) .centerCrop() .apply(RequestOptions.bitmapTransform(BlurTransformation(this, 25))) .into(iv_bg) } + private fun defaultCover(): RequestBuilder { + return ImageLoader.load(this, R.drawable.image_cover_default) + .apply(RequestOptions.bitmapTransform(BlurTransformation(this, 25))) + } + private fun playButton() { when (status) { Status.PLAY -> AudioPlay.pause(this)