From 5571f64250dcd68173c48679722c5701a547c25a Mon Sep 17 00:00:00 2001 From: Isidro Date: Sat, 15 Feb 2025 01:40:25 +0300 Subject: [PATCH] Fix issue #610: keep layout params --- cropper/src/main/kotlin/com/canhub/cropper/CropImageView.kt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cropper/src/main/kotlin/com/canhub/cropper/CropImageView.kt b/cropper/src/main/kotlin/com/canhub/cropper/CropImageView.kt index e37c0c33..2d818b37 100644 --- a/cropper/src/main/kotlin/com/canhub/cropper/CropImageView.kt +++ b/cropper/src/main/kotlin/com/canhub/cropper/CropImageView.kt @@ -1241,11 +1241,6 @@ class CropImageView @JvmOverloads constructor( override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) { super.onLayout(changed, l, t, r, b) if (mLayoutWidth > 0 && mLayoutHeight > 0) { - // Gets original parameters, and creates the new parameters - val origParams = this.layoutParams - origParams.width = mLayoutWidth - origParams.height = mLayoutHeight - layoutParams = origParams if (originalBitmap != null) { applyImageMatrix( (r - l).toFloat(),