From 780c1f8a4cf273cee580377b2dd8928c52c6148a Mon Sep 17 00:00:00 2001 From: Junyoung-WON Date: Wed, 24 Jul 2024 15:21:03 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20centerCrop=20=EC=84=A4=EC=A0=95=EC=9D=84?= =?UTF-8?q?=20BindingAdapter=20=EC=97=90=20=EC=9C=84=EC=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - xml 속성으로 centerCrop을 주게 되면 Round Corner가 제대로 적용되지 않는 현상 발생 - Glide의 api로 제공되는 centerCrop() 메서드를 활용 --- .../com/woowacourse/staccato/presentation/BindingAdapters.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/BindingAdapters.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/BindingAdapters.kt index 7b29bd6e4..a295c42cd 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/BindingAdapters.kt +++ b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/BindingAdapters.kt @@ -61,6 +61,7 @@ fun ImageView.loadImageWithGlide( Glide.with(context) .load(url) .placeholder(placeHolder) + .centerCrop() .error(placeHolder) .into(this) } @@ -91,6 +92,7 @@ fun ImageView.setRoundedCornerImageWithGlide( Glide.with(context) .load(url) .placeholder(placeHolder) + .centerCrop() .apply(RequestOptions.bitmapTransform(RoundedCorners(roundingRadius))) .error(placeHolder) .into(this)