pull/433/head
gedoor 4 years ago
parent a349326ad3
commit a1ce3797e3
  1. 6
      app/src/main/java/io/legado/app/ui/widget/image/CoverImageView.kt
  2. 4
      app/src/main/res/layout/item_bookshelf_grid.xml

@ -16,7 +16,10 @@ import io.legado.app.constant.PreferKey
import io.legado.app.help.ImageLoader
import io.legado.app.utils.getPrefString
/**
* 封面
*/
@Suppress("unused")
class CoverImageView : androidx.appcompat.widget.AppCompatImageView {
internal var width: Float = 0.toFloat()
internal var height: Float = 0.toFloat()
@ -171,6 +174,7 @@ class CoverImageView : androidx.appcompat.widget.AppCompatImageView {
upDefaultCover()
}
@SuppressLint("UseCompatLoadingForDrawables")
fun upDefaultCover() {
val path = App.INSTANCE.getPrefString(PreferKey.defaultCover)
var dw = Drawable.createFromPath(path)

@ -52,13 +52,11 @@
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginTop="6dp"
android:ellipsize="end"
android:gravity="top|center_horizontal"
android:includeFontPadding="false"
android:lines="2"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:text="@string/book_name"
android:textColor="@color/primaryText"
android:textSize="12sp"

Loading…
Cancel
Save