pull/277/head
gedoor 4 years ago
parent 80f83a9973
commit 8d6d02c5d5
  1. 7
      app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt
  2. 3
      app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
  3. 2
      app/src/main/java/io/legado/app/ui/widget/image/CoverImageView.kt

@ -27,6 +27,7 @@ import io.legado.app.service.AudioPlayService
import io.legado.app.service.help.AudioPlay
import io.legado.app.ui.book.changesource.ChangeSourceDialog
import io.legado.app.ui.book.chapterlist.ChapterListActivity
import io.legado.app.ui.widget.image.CoverImageView
import io.legado.app.utils.*
import kotlinx.android.synthetic.main.activity_audio_play.*
import org.apache.commons.lang3.time.DateFormatUtils
@ -117,8 +118,8 @@ class AudioPlayActivity :
private fun upCover(path: String?) {
ImageLoader.load(this, path)
.placeholder(R.drawable.image_cover_default)
.error(R.drawable.image_cover_default)
.placeholder(CoverImageView.defaultDrawable)
.error(CoverImageView.defaultDrawable)
.into(iv_cover)
ImageLoader.load(this, path)
.transition(DrawableTransitionOptions.withCrossFade(1500))
@ -128,7 +129,7 @@ class AudioPlayActivity :
}
private fun defaultCover(): RequestBuilder<Drawable> {
return ImageLoader.load(this, R.drawable.image_cover_default)
return ImageLoader.load(this, CoverImageView.defaultDrawable)
.apply(bitmapTransform(BlurTransformation(this, 25)))
}

@ -32,6 +32,7 @@ import io.legado.app.ui.book.info.edit.BookInfoEditActivity
import io.legado.app.ui.book.read.ReadBookActivity
import io.legado.app.ui.book.search.SearchActivity
import io.legado.app.ui.book.source.edit.BookSourceEditActivity
import io.legado.app.ui.widget.image.CoverImageView
import io.legado.app.utils.dp
import io.legado.app.utils.getViewModel
import io.legado.app.utils.gone
@ -141,7 +142,7 @@ class BookInfoActivity :
}
private fun defaultCover(): RequestBuilder<Drawable> {
return ImageLoader.load(this, R.drawable.image_cover_default)
return ImageLoader.load(this, CoverImageView.defaultDrawable)
.apply(bitmapTransform(BlurTransformation(this, 25)))
}

@ -165,7 +165,7 @@ class CoverImageView : androidx.appcompat.widget.AppCompatImageView {
companion object {
private var showBookName = false
private lateinit var defaultDrawable: Drawable
lateinit var defaultDrawable: Drawable
init {
upDefaultCover()

Loading…
Cancel
Save