fix(chat-room): 채팅 아이템 UI, 메시지 입력 창 UI

- 채팅 아이템이 화면을 벗어나는 버그 수정
- 메시지 입력창 글자크기 14sp, rounded corner 32dp
This commit is contained in:
2025-08-15 00:29:56 +09:00
parent 3d727f07fa
commit dd7251f18b
8 changed files with 154 additions and 101 deletions

View File

@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
AI 메시지 아이템 레이아웃 (3.3)
- 왼쪽 정렬된 메시지 버블
- 프로필 이미지, 이름(조건부), 메시지, 시간(오른쪽, 조건부)
@@ -9,11 +8,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:paddingTop="6dp"
android:paddingBottom="6dp">
android:layout_height="wrap_content">
<!-- 프로필 이미지 (그룹 첫 메시지에서만 보임) -->
<ImageView
@@ -21,36 +16,36 @@
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginEnd="8dp"
android:contentDescription="@string/a11y_ai_profile_image"
android:scaleType="centerCrop"
android:src="@drawable/ic_placeholder_profile"
android:contentDescription="@string/a11y_ai_profile_image"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
app:layout_constraintTop_toTopOf="@id/message_group" />
<!-- 메시지 그룹: 이름 + 메시지 버블 -->
<LinearLayout
android:id="@+id/message_group"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:orientation="vertical"
app:layout_constraintStart_toEndOf="@id/iv_profile"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@id/tv_time"
app:layout_constraintHorizontal_bias="0"
android:layout_marginEnd="8dp">
app:layout_constraintStart_toEndOf="@id/iv_profile"
app:layout_constraintTop_toTopOf="parent">
<!-- 보낸이 이름 (그룹의 첫 메시지에서만 보임) -->
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="12sp"
android:includeFontPadding="false"
android:layout_marginBottom="2dp"
android:ellipsize="end"
android:fontFamily="@font/pretendard_regular"
android:includeFontPadding="false"
android:maxLines="1"
android:ellipsize="end" />
android:textColor="@android:color/white"
android:textSize="12sp" />
<!-- 메시지 버블 컨테이너 -->
<androidx.constraintlayout.widget.ConstraintLayout
@@ -58,27 +53,26 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_chat_ai_message"
android:paddingStart="14dp"
android:paddingEnd="14dp"
android:paddingTop="10dp"
android:paddingBottom="10dp">
android:paddingHorizontal="10dp"
android:paddingVertical="8dp">
<TextView
android:id="@+id/tv_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="15sp"
android:lineSpacingExtra="2dp"
android:includeFontPadding="false"
android:hyphenationFrequency="normal"
android:breakStrategy="balanced"
android:ellipsize="end"
android:fontFamily="@font/pretendard_regular"
android:hyphenationFrequency="normal"
android:includeFontPadding="false"
android:lineSpacingExtra="2dp"
android:maxLines="1000"
app:layout_constraintTop_toTopOf="parent"
android:textColor="@android:color/white"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
@@ -87,12 +81,13 @@
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:fontFamily="@font/pretendard_regular"
android:includeFontPadding="false"
android:textColor="@color/color_777777"
android:textSize="12sp"
android:includeFontPadding="false"
app:layout_constraintBottom_toBottomOf="@id/message_group"
app:layout_constraintStart_toEndOf="@id/message_group"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginStart="8dp" />
app:layout_constraintStart_toEndOf="@id/message_group" />
</androidx.constraintlayout.widget.ConstraintLayout>