pull/525/head
gedoor 4 years ago
parent 15609cc898
commit bbd2cdba47
  1. 12
      app/src/main/java/io/legado/app/ui/widget/image/CircleImageView.kt
  2. 1
      app/src/main/res/layout/item_book_source.xml
  3. 1
      app/src/main/res/layout/item_read_style.xml

@ -122,7 +122,6 @@ class CircleImageView @JvmOverloads constructor(
var isInView = false var isInView = false
init { init {
super.setScaleType(SCALE_TYPE)
val a = context.obtainStyledAttributes(attrs, R.styleable.CircleImageView) val a = context.obtainStyledAttributes(attrs, R.styleable.CircleImageView)
mBorderWidth = mBorderWidth =
a.getDimensionPixelSize( 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) { override fun setAdjustViewBounds(adjustViewBounds: Boolean) {
if (adjustViewBounds) { if (adjustViewBounds) {
throw IllegalArgumentException("adjustViewBounds not supported.") throw IllegalArgumentException("adjustViewBounds not supported.")
@ -456,7 +445,6 @@ class CircleImageView @JvmOverloads constructor(
} }
companion object { companion object {
private val SCALE_TYPE = ScaleType.CENTER_CROP
private val BITMAP_CONFIG = Bitmap.Config.ARGB_8888 private val BITMAP_CONFIG = Bitmap.Config.ARGB_8888
private const val COLOR_DRAWABLE_DIMENSION = 2 private const val COLOR_DRAWABLE_DIMENSION = 2
private const val DEFAULT_BORDER_WIDTH = 0 private const val DEFAULT_BORDER_WIDTH = 0

@ -62,6 +62,7 @@
android:id="@+id/iv_explore" android:id="@+id/iv_explore"
android:layout_width="8dp" android:layout_width="8dp"
android:layout_height="8dp" android:layout_height="8dp"
android:scaleType="centerCrop"
android:contentDescription="@string/more_menu" android:contentDescription="@string/more_menu"
android:src="@color/md_green_600" android:src="@color/md_green_600"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"

@ -6,6 +6,7 @@
android:layout_height="48dp" android:layout_height="48dp"
android:layout_marginLeft="6dp" android:layout_marginLeft="6dp"
android:layout_marginRight="6dp" android:layout_marginRight="6dp"
android:scaleType="centerCrop"
android:src="@drawable/image_cover_default" android:src="@drawable/image_cover_default"
app:civ_border_color="@color/primaryText" app:civ_border_color="@color/primaryText"
app:civ_border_width="1dp" app:civ_border_width="1dp"

Loading…
Cancel
Save