diff --git a/app/src/main/java/io/legado/app/ui/widget/image/CircleImageView.kt b/app/src/main/java/io/legado/app/ui/widget/image/CircleImageView.kt index acde8db7a..c84097a80 100644 --- a/app/src/main/java/io/legado/app/ui/widget/image/CircleImageView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/image/CircleImageView.kt @@ -122,7 +122,6 @@ class CircleImageView @JvmOverloads constructor( var isInView = false init { - super.setScaleType(SCALE_TYPE) val a = context.obtainStyledAttributes(attrs, R.styleable.CircleImageView) mBorderWidth = a.getDimensionPixelSize( @@ -160,16 +159,6 @@ class CircleImageView @JvmOverloads constructor( } } - override fun getScaleType(): ScaleType { - return SCALE_TYPE - } - - override fun setScaleType(scaleType: ScaleType) { - if (scaleType != SCALE_TYPE) { - throw IllegalArgumentException(String.format("ScaleType %s not supported.", scaleType)) - } - } - override fun setAdjustViewBounds(adjustViewBounds: Boolean) { if (adjustViewBounds) { throw IllegalArgumentException("adjustViewBounds not supported.") @@ -456,7 +445,6 @@ class CircleImageView @JvmOverloads constructor( } companion object { - private val SCALE_TYPE = ScaleType.CENTER_CROP private val BITMAP_CONFIG = Bitmap.Config.ARGB_8888 private const val COLOR_DRAWABLE_DIMENSION = 2 private const val DEFAULT_BORDER_WIDTH = 0 diff --git a/app/src/main/res/layout/item_book_source.xml b/app/src/main/res/layout/item_book_source.xml index a9089f1af..4f3584999 100644 --- a/app/src/main/res/layout/item_book_source.xml +++ b/app/src/main/res/layout/item_book_source.xml @@ -62,6 +62,7 @@ android:id="@+id/iv_explore" android:layout_width="8dp" android:layout_height="8dp" + android:scaleType="centerCrop" android:contentDescription="@string/more_menu" android:src="@color/md_green_600" app:layout_constraintRight_toRightOf="parent" diff --git a/app/src/main/res/layout/item_read_style.xml b/app/src/main/res/layout/item_read_style.xml index 1df8bd29e..28a861f81 100644 --- a/app/src/main/res/layout/item_read_style.xml +++ b/app/src/main/res/layout/item_read_style.xml @@ -6,6 +6,7 @@ android:layout_height="48dp" android:layout_marginLeft="6dp" android:layout_marginRight="6dp" + android:scaleType="centerCrop" android:src="@drawable/image_cover_default" app:civ_border_color="@color/primaryText" app:civ_border_width="1dp"