|
|
|
@ -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 |
|
|
|
|