feat(character-detail): 캐릭터 상세 댓글 섹션 추가 및 데이터 바인딩
- 댓글 입력 필드 stroke(흰색 1dp stroke와 radius 5dp) 추가 - 입력 박스 내부 우측에 전송 아이콘(ic_message_send) 추가 - 배경 드로어블(#263238, radius 10dp) 추가 - CharacterCommentResponse에 comment(nullable) 필드 추가 - CharacterDetailActivity에서 latestComment/totalComments 바인딩 및 UI 분기 처리
This commit is contained in:
6
app/src/main/res/drawable/bg_round_corner_10_263238.xml
Normal file
6
app/src/main/res/drawable/bg_round_corner_10_263238.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="10dp" />
|
||||
<solid android:color="#263238" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="5dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@android:color/white" />
|
||||
<solid android:color="@android:color/transparent" />
|
||||
</shape>
|
||||
@@ -327,6 +327,139 @@
|
||||
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="댓글"
|
||||
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="댓글을 입력해보세요"
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user