Files
sodalive-android/app/src/main/res/layout/activity_chat_room.xml
klaus dd7251f18b fix(chat-room): 채팅 아이템 UI, 메시지 입력 창 UI
- 채팅 아이템이 화면을 벗어나는 버그 수정
- 메시지 입력창 글자크기 14sp, rounded corner 32dp
2025-08-15 00:29:56 +09:00

228 lines
9.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_131313">
<!-- 배경 프로필 이미지 -->
<ImageView
android:id="@+id/iv_background_profile"
android:layout_width="0dp"
android:layout_height="0dp"
android:contentDescription="@string/a11y_profile_background"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- 딤 처리 (activity_character_detail.xml의 view_character_dim 스타일 참조) -->
<View
android:id="@+id/view_character_dim"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/color_99000000"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- 상태바 영역 배경 -->
<View
android:id="@+id/status_bar_background"
android:layout_width="0dp"
android:layout_height="24dp"
android:background="@android:color/transparent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- 헤더 영역 -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/header_container"
android:layout_width="0dp"
android:layout_height="56dp"
android:background="@android:color/transparent"
android:paddingHorizontal="16dp"
android:paddingVertical="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/status_bar_background">
<ImageView
android:id="@+id/iv_back"
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@string/a11y_back"
android:src="@drawable/ic_back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_profile"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="12dp"
android:contentDescription="@string/a11y_profile_image"
android:src="@drawable/ic_placeholder_profile"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_back"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="12dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@+id/iv_profile"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_profile"
app:layout_constraintTop_toTopOf="@id/iv_profile">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:fontFamily="@font/pretendard_bold"
android:maxLines="1"
android:textColor="#FFFFFFFF"
android:textSize="12sp"
app:layout_constraintStart_toEndOf="@id/iv_profile"
app:layout_constraintTop_toTopOf="@id/iv_profile"
tools:text="Character Name" />
<TextView
android:id="@+id/tv_character_type_badge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:background="@drawable/bg_character_status_clone"
android:fontFamily="@font/pretendard_regular"
android:paddingHorizontal="4dp"
android:paddingVertical="2dp"
android:textColor="#FFFFFFFF"
android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="@id/iv_profile"
app:layout_constraintEnd_toEndOf="parent"
tools:ignore="SmallSp"
tools:text="Clone" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 안내 메시지 영역 -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/notice_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:background="@drawable/bg_chat_notice"
android:padding="12dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/header_container">
<ImageView
android:id="@+id/iv_notice_icon"
android:layout_width="20dp"
android:layout_height="20dp"
android:contentDescription="@string/a11y_notice"
android:src="@android:drawable/ic_dialog_info"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="#FFFFFFFF" />
<TextView
android:id="@+id/tv_notice_message"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="@string/chat_notice_clone"
android:textColor="#FFFFFFFF"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/iv_collapse"
app:layout_constraintStart_toEndOf="@id/iv_notice_icon"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_collapse"
android:layout_width="20dp"
android:layout_height="20dp"
android:contentDescription="@string/a11y_collapse"
android:src="@android:drawable/arrow_up_float"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="#FFFFFFFF" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 채팅 메시지 영역 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_messages"
android:layout_width="0dp"
android:layout_height="0dp"
android:clipToPadding="false"
app:layout_constraintBottom_toTopOf="@id/input_container"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/notice_container" />
<!-- 입력 영역 -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/input_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:padding="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<EditText
android:id="@+id/et_message"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:background="@drawable/bg_chat_input"
android:fontFamily="@font/pretendard_regular"
android:hint="@string/chat_input_placeholder"
android:imeOptions="actionSend|flagNoEnterAction"
android:importantForAutofill="no"
android:inputType="textMultiLine"
android:maxLength="200"
android:maxLines="4"
android:minHeight="48dp"
android:paddingHorizontal="16dp"
android:paddingVertical="8dp"
android:textColor="#FFFFFFFF"
android:textColorHint="#80FFFFFF"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/iv_send"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_send"
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@string/action_send"
android:src="@drawable/ic_message_send"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>