From e05606207720a98239428e5a2242d284bb788b27 Mon Sep 17 00:00:00 2001 From: Jarvis Lin Date: Tue, 4 Jun 2024 16:01:35 +0200 Subject: [PATCH 1/2] Change the circular avatar to a rounded corner avatar. --- .../org/wordpress/android/ui/main/ChooseSiteViewHolder.kt | 5 +---- WordPress/src/main/res/layout/item_choose_site.xml | 2 +- WordPress/src/main/res/values/dimens.xml | 1 + WordPress/src/main/res/values/styles.xml | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/main/ChooseSiteViewHolder.kt b/WordPress/src/main/java/org/wordpress/android/ui/main/ChooseSiteViewHolder.kt index 3d72d0476dee..9e169ba7f29f 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/main/ChooseSiteViewHolder.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/main/ChooseSiteViewHolder.kt @@ -88,10 +88,7 @@ class ChooseSiteViewHolder(private val binding: ItemChooseSiteBinding) : Recycle } private fun handleAvatar(site: SiteRecord) { - imageManager.loadImageWithCorners( - binding.avatar, site.blavatarType, site.blavatarUrl, - itemView.context.resources.getDimensionPixelSize(R.dimen.blavatar_sz) / 2 - ) + imageManager.load(binding.avatar, site.blavatarType, site.blavatarUrl) val isDarkTheme = itemView.resources.configuration.isDarkTheme() val borderColor = ContextCompat.getColor( itemView.context, diff --git a/WordPress/src/main/res/layout/item_choose_site.xml b/WordPress/src/main/res/layout/item_choose_site.xml index 9ffc791af9dd..035f6304e183 100644 --- a/WordPress/src/main/res/layout/item_choose_site.xml +++ b/WordPress/src/main/res/layout/item_choose_site.xml @@ -48,7 +48,7 @@ android:layout_height="wrap_content" android:layout_marginStart="@dimen/margin_extra_large" android:layout_marginVertical="@dimen/margin_medium" - app:cardCornerRadius="@dimen/avatar_sz_medium_radius" + app:cardCornerRadius="@dimen/blavatar_sz_radius" app:cardElevation="0dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/WordPress/src/main/res/values/dimens.xml b/WordPress/src/main/res/values/dimens.xml index 7f2071eeed0d..36bf9c73c291 100644 --- a/WordPress/src/main/res/values/dimens.xml +++ b/WordPress/src/main/res/values/dimens.xml @@ -189,6 +189,7 @@ 1dp 32dp 40dp + 8dp 72dp 56dp diff --git a/WordPress/src/main/res/values/styles.xml b/WordPress/src/main/res/values/styles.xml index b4608dbc00ac..7b5f5cb41205 100644 --- a/WordPress/src/main/res/values/styles.xml +++ b/WordPress/src/main/res/values/styles.xml @@ -1835,6 +1835,6 @@ From 1aae7f9b71b10184a283f45e5dee45d14dfe2972 Mon Sep 17 00:00:00 2001 From: Jarvis Lin Date: Tue, 4 Jun 2024 17:36:25 +0200 Subject: [PATCH 2/2] Remove a unused dimens value --- WordPress/src/main/res/values/dimens.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/WordPress/src/main/res/values/dimens.xml b/WordPress/src/main/res/values/dimens.xml index 36bf9c73c291..921a63906006 100644 --- a/WordPress/src/main/res/values/dimens.xml +++ b/WordPress/src/main/res/values/dimens.xml @@ -178,7 +178,6 @@ 24dp 32dp 40dp - 20dp 48dp 64dp 72dp @@ -189,7 +188,7 @@ 1dp 32dp 40dp - 8dp + 5dp 72dp 56dp