diff --git a/app/src/main/java/io/legado/app/ui/widget/image/CoverImageView.kt b/app/src/main/java/io/legado/app/ui/widget/image/CoverImageView.kt index f2b4373a4..52b0517c2 100644 --- a/app/src/main/java/io/legado/app/ui/widget/image/CoverImageView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/image/CoverImageView.kt @@ -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) diff --git a/app/src/main/res/layout/item_bookshelf_grid.xml b/app/src/main/res/layout/item_bookshelf_grid.xml index 618dc8c1f..0816a9a83 100644 --- a/app/src/main/res/layout/item_bookshelf_grid.xml +++ b/app/src/main/res/layout/item_bookshelf_grid.xml @@ -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"