Files
sodalive-android/app/src/main/res/layout/fragment_character_detail.xml
klaus 3cf24c2ab6 캐릭터 상세 문자열 리소스화
CharacterDetail/갤러리 탭 다국어 리소스 추가

UiText로 오류 메시지 지역화 처리
2025-12-01 17:00:26 +09:00

561 lines
26 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">
<!-- 메인 스크롤 영역 (상세 탭에서만 표시) -->
<androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view_character_detail"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_above="@+id/btn_chat"
android:clipToPadding="false"
android:fillViewport="true"
app:layout_constraintBottom_toTopOf="@+id/btn_chat"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:orientation="vertical">
<!-- 캐릭터 이미지 및 프로필 영역 -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/rl_character_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp">
<!-- 캐릭터 배경 이미지 -->
<ImageView
android:id="@+id/iv_character_background"
android:layout_width="0dp"
android:layout_height="0dp"
android:contentDescription="@null"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 캐릭터 정보 -->
<LinearLayout
android:id="@+id/ll_character_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp"
android:layout_marginBottom="16dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<LinearLayout
android:id="@+id/ll_gender_age_mbti"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_gender"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/pretendard_regular"
android:paddingHorizontal="7dp"
android:paddingVertical="3dp"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_age"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:background="@drawable/bg_character_info"
android:fontFamily="@font/pretendard_regular"
android:paddingHorizontal="7dp"
android:paddingVertical="3dp"
android:textColor="#B0BEC5"
android:textSize="14sp"
tools:text="20세" />
<TextView
android:id="@+id/tv_mbti"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_character_info"
android:fontFamily="@font/pretendard_regular"
android:paddingHorizontal="7dp"
android:paddingVertical="3dp"
android:textColor="#B0BEC5"
android:textSize="14sp"
tools:text="ENFP" />
</LinearLayout>
<!-- 캐릭터명과 상태 -->
<LinearLayout
android:id="@+id/ll_character_name_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_character_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/pretendard_bold"
android:textColor="@color/white"
android:textSize="26sp"
tools:text="캐릭터명" />
<TextView
android:id="@+id/tv_character_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="@drawable/bg_character_status_clone"
android:fontFamily="@font/pretendard_regular"
android:paddingHorizontal="5dp"
android:paddingVertical="1dp"
android:textColor="@color/white"
android:textSize="12sp"
tools:text="Clone" />
</LinearLayout>
<!-- 캐릭터 소개 -->
<TextView
android:id="@+id/tv_character_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:fontFamily="@font/pretendard_regular"
android:textColor="@color/color_b0bec5"
android:textSize="18sp"
tools:text="캐릭터 한줄 소개" />
<!-- 태그 -->
<TextView
android:id="@+id/tv_character_tags"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:fontFamily="@font/pretendard_regular"
android:textColor="@color/color_3bb9f1"
android:textSize="14sp"
tools:text="#커버곡 #라이브 #연애 #썸 #채팅 #라방" />
</LinearLayout>
<!-- 세계관 섹션 -->
<LinearLayout
android:id="@+id/ll_worldview_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp"
android:layout_marginBottom="16dp"
android:orientation="vertical">
<!-- 섹션 제목 -->
<TextView
android:id="@+id/tv_worldview_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/pretendard_bold"
android:text="@string/character_detail_worldview_title"
android:textColor="@color/white"
android:textSize="16sp" />
<!-- 세계관 내용 -->
<TextView
android:id="@+id/tv_worldview_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:fontFamily="@font/pretendard_regular"
android:lineSpacingExtra="4dp"
android:textColor="@color/color_b0bec5"
android:textSize="16sp"
tools:text="특별한 꽃을 길러낼 수 있는 능력을 가진 리엘라.\n\n그녀는 호손 공작의 상속자가 되고 말아버리는데..." />
<!-- 더보기 버튼 -->
<LinearLayout
android:id="@+id/ll_worldview_expand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/iv_worldview_expand"
android:layout_width="20dp"
android:layout_height="20dp"
android:contentDescription="@null"
android:src="@drawable/ic_chevron_down" />
<TextView
android:id="@+id/tv_worldview_expand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/pretendard_regular"
android:text="@string/read_more"
android:textColor="@color/color_607d8b"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<!-- 원작 섹션 -->
<LinearLayout
android:id="@+id/ll_original_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="36dp"
android:layout_marginBottom="16dp"
android:orientation="vertical">
<!-- 섹션 제목 -->
<TextView
android:id="@+id/tv_original_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/pretendard_bold"
android:text="@string/character_detail_original_title"
android:textColor="@color/white"
android:textSize="16sp" />
<!-- 원작 내용 -->
<TextView
android:id="@+id/tv_original_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:fontFamily="@font/pretendard_regular"
android:maxLines="3"
android:textColor="@color/color_b0bec5"
android:textSize="16sp"
tools:text="네이버 시리즈 독 안에 든 선생님" />
<!-- 원작 보러가기 버튼 -->
<TextView
android:id="@+id/tv_original_link"
android:layout_width="match_parent"
android:layout_height="54dp"
android:layout_marginTop="8dp"
android:background="@drawable/bg_round_corner_16_stroke_3bb9f1"
android:fontFamily="@font/pretendard_bold"
android:gravity="center"
android:text="@string/character_detail_original_link"
android:textColor="@color/color_3bb9f1"
android:textSize="16sp" />
</LinearLayout>
<!-- 성격 섹션 (세계관과 동일 UI) -->
<LinearLayout
android:id="@+id/ll_personality_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp"
android:layout_marginBottom="16dp"
android:orientation="vertical">
<!-- 섹션 제목 -->
<TextView
android:id="@+id/tv_personality_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/pretendard_bold"
android:text="@string/character_detail_personality_title"
android:textColor="@color/white"
android:textSize="16sp" />
<!-- 성격 내용 -->
<TextView
android:id="@+id/tv_personality_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:fontFamily="@font/pretendard_regular"
android:lineSpacingExtra="4dp"
android:textColor="@color/color_b0bec5"
android:textSize="16sp"
tools:text="밝고 쾌활하지만 때로는 고집이 센 면모도 있습니다.\n\n친구를 소중히 여기며, 어려움 앞에서도 물러서지 않습니다." />
<!-- 더보기 버튼 -->
<LinearLayout
android:id="@+id/ll_personality_expand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/iv_personality_expand"
android:layout_width="20dp"
android:layout_height="20dp"
android:contentDescription="@null"
android:src="@drawable/ic_chevron_down" />
<TextView
android:id="@+id/tv_personality_expand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/pretendard_regular"
android:text="@string/read_more"
android:textColor="@color/color_607d8b"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<!-- 캐릭터톡 대화 가이드 섹션 -->
<LinearLayout
android:id="@+id/ll_chat_guide_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp"
android:layout_marginBottom="24dp"
android:background="@drawable/bg_round_corner_16_stroke_37474f"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingVertical="12dp">
<!-- 가이드 제목 -->
<TextView
android:id="@+id/tv_chat_guide_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/pretendard_bold"
android:text="@string/character_detail_chat_guide_title"
android:textColor="@color/color_b0bec5"
android:textSize="16sp" />
<!-- 가이드 내용 -->
<TextView
android:id="@+id/tv_chat_guide_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:fontFamily="@font/pretendard_regular"
android:lineSpacingExtra="4dp"
android:text="@string/character_detail_chat_guide_desc"
android:textColor="@color/color_7c7c80"
android:textSize="16sp" />
<!-- 주의사항 -->
<TextView
android:id="@+id/tv_chat_guide_notice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:fontFamily="@font/pretendard_regular"
android:lineSpacingExtra="4dp"
android:text="@string/character_detail_chat_guide_notice"
android:textColor="@color/color_7c7c80"
android:textSize="14sp" />
</LinearLayout>
<!-- 댓글 섹션 -->
<LinearLayout
android:id="@+id/ll_comments_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp"
android:layout_marginBottom="24dp"
android:background="@drawable/bg_round_corner_10_263238"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingVertical="12dp">
<!-- 헤더: 댓글 (댓글 수) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_comments_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/pretendard_regular"
android:text="@string/character_detail_comments_label"
android:textColor="@color/color_b0bec5"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_comments_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:fontFamily="@font/pretendard_bold"
android:textColor="@color/color_b0bec5"
android:textSize="16sp"
tools:text="0" />
</LinearLayout>
<!-- 내용 컨테이너 -->
<LinearLayout
android:id="@+id/ll_comments_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical">
<!-- 댓글 있을 때 -->
<LinearLayout
android:id="@+id/ll_latest_comment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/iv_comment_profile"
android:layout_width="36dp"
android:layout_height="36dp"
android:contentDescription="@null"
android:src="@drawable/ic_placeholder_profile" />
<TextView
android:id="@+id/tv_latest_comment"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:fontFamily="@font/pretendard_regular"
android:textColor="@color/white"
android:textSize="16sp"
tools:text="가장 최근 댓글 내용이 여기에 표시됩니다." />
</LinearLayout>
<!-- 댓글 없을 때 -->
<LinearLayout
android:id="@+id/ll_no_comment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_my_profile"
android:layout_width="36dp"
android:layout_height="36dp"
android:contentDescription="@null"
android:src="@drawable/ic_placeholder_profile" />
<LinearLayout
android:id="@+id/ll_comment_input_box"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:background="@drawable/bg_round_corner_5_stroke_white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="12dp"
android:paddingVertical="8dp">
<EditText
android:id="@+id/et_comment_input"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:layout_weight="1"
android:background="@android:color/transparent"
android:fontFamily="@font/pretendard_regular"
android:hint="@string/character_detail_comment_input_hint"
android:imeOptions="actionSend"
android:importantForAutofill="no"
android:inputType="textCapSentences|textMultiLine"
android:maxLines="3"
android:padding="0dp"
android:textColor="@color/white"
android:textColorHint="@color/color_7c7c80"
android:textSize="14sp"
tools:ignore="NestedWeights" />
<ImageView
android:id="@+id/iv_send_comment"
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@null"
android:src="@drawable/ic_message_send" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- 장르의 다른 캐릭터 섹션 -->
<LinearLayout
android:id="@+id/ll_other_characters_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:orientation="vertical">
<!-- 섹션 제목 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<TextView
android:id="@+id/tv_other_characters_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fontFamily="@font/pretendard_bold"
android:text="@string/character_detail_other_characters_title"
android:textColor="@color/white"
android:textSize="26sp" />
</LinearLayout>
<!-- 캐릭터 리스트 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_other_characters"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:clipToPadding="false"
android:paddingHorizontal="24dp" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<!-- 하단 고정 대화하기 버튼 -->
<TextView
android:id="@+id/btn_chat"
android:layout_width="0dp"
android:layout_height="54dp"
android:layout_marginHorizontal="24dp"
android:layout_marginBottom="10dp"
android:background="@drawable/bg_round_corner_16_solid_3bb9f1"
android:fontFamily="@font/pretendard_bold"
android:gravity="center"
android:text="@string/character_detail_chat_button"
android:textColor="@color/white"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>