From 65791c55ca54b6921ec05ebfac6fb1292532c0da Mon Sep 17 00:00:00 2001 From: klaus Date: Fri, 5 Sep 2025 18:30:58 +0900 Subject: [PATCH] feat(ui): enforce 2:3 aspect ratio and center chatroom background - item_character_gallery.xml: set iv_image to 2:3 - activity_chat_room.xml: apply H,2:3 ratio and center frame by constraining top/bottom to parent - item_chat_background_image.xml: set picker item to 2:3 - align dim view constraints to match background area --- app/src/main/res/layout/activity_chat_room.xml | 9 +++++---- app/src/main/res/layout/item_character_gallery.xml | 4 ++-- app/src/main/res/layout/item_chat_background_image.xml | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/layout/activity_chat_room.xml b/app/src/main/res/layout/activity_chat_room.xml index bfd9a722..6a89f5a5 100644 --- a/app/src/main/res/layout/activity_chat_room.xml +++ b/app/src/main/res/layout/activity_chat_room.xml @@ -13,10 +13,11 @@ android:layout_height="0dp" android:contentDescription="@string/a11y_profile_background" android:scaleType="centerCrop" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintDimensionRatio="H,2:3" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" /> + app:layout_constraintTop_toTopOf="@id/iv_background_profile" /> - + diff --git a/app/src/main/res/layout/item_chat_background_image.xml b/app/src/main/res/layout/item_chat_background_image.xml index a3958c96..619d967c 100644 --- a/app/src/main/res/layout/item_chat_background_image.xml +++ b/app/src/main/res/layout/item_chat_background_image.xml @@ -10,7 +10,7 @@ android:layout_height="0dp" android:contentDescription="@null" android:scaleType="centerCrop" - app:layout_constraintDimensionRatio="4:5" + app:layout_constraintDimensionRatio="2:3" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" />