Fixing animations
This commit is contained in:
parent
0679774d41
commit
b944ef5de6
21 changed files with 123 additions and 122 deletions
|
@ -31,9 +31,12 @@ class RetroShapeableImageView @JvmOverloads constructor(
|
|||
init {
|
||||
val typedArray =
|
||||
context.obtainStyledAttributes(attrs, R.styleable.RetroShapeableImageView, defStyle, -1)
|
||||
val cornerSize =
|
||||
typedArray.getDimension(R.styleable.RetroShapeableImageView_retroCornerSize, 0f)
|
||||
updateCornerSize(cornerSize)
|
||||
val cornerSize = typedArray.getDimension(R.styleable.RetroShapeableImageView_retroCornerSize, 0f)
|
||||
val circleShape = typedArray.getBoolean(R.styleable.RetroShapeableImageView_circleShape, false)
|
||||
addOnLayoutChangeListener { _, _, _, _, _, _, _, _, _ ->
|
||||
val radius = width / 2f
|
||||
shapeAppearanceModel = ShapeAppearanceModel().withCornerSize(radius)
|
||||
}
|
||||
typedArray.recycle()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue