Skip to content

Commit

Permalink
Resize fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thomhurst committed Feb 11, 2019
1 parent 4cd3603 commit 246f76c
Showing 1 changed file with 2 additions and 5 deletions.
Expand Up @@ -75,13 +75,10 @@ class RoundImageView : FrameLayout {
}

private fun setInnerCardSize(borderWidth: Float) {
val mainHeight = height
val mainWidth = width

picture_card_circle.apply {
onGlobalLayout {
val newHeight = mainHeight.minus(borderWidth.times(2).roundToInt())
val newWidth = mainWidth.minus(borderWidth.times(2).roundToInt())
val newHeight = view.height.minus(borderWidth.times(2).roundToInt())
val newWidth = view.width.minus(borderWidth.times(2).roundToInt())
layoutParams.height = newHeight
layoutParams.width = newWidth

Expand Down

0 comments on commit 246f76c

Please sign in to comment.