feat(character-comment): 캐릭터 댓글 리스트 BottomSheet UI 및 페이징 스텁 구현
- CharacterDetail 댓글 섹션 터치 시 BottomSheet 표시 - 헤더/입력폼/Divider/리스트/더보기 BottomSheet 구성 - RecyclerView 하단 도달 시 더미 데이터 추가 로드(Stub) - 상대시간 표기(분/시간/일/년 전) - API 연동은 이후 작업 예정 (스텁)
This commit is contained in:
11
app/src/main/res/layout/dialog_character_comment.xml
Normal file
11
app/src/main/res/layout/dialog_character_comment.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
31
app/src/main/res/layout/dialog_character_comment_more.xml
Normal file
31
app/src/main/res/layout/dialog_character_comment_more.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:background="@color/color_131313">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_report"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="12dp"
|
||||
android:text="신고"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#78909C" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_delete"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="12dp"
|
||||
android:text="삭제"
|
||||
android:textColor="#EF5350"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
135
app/src/main/res/layout/fragment_character_comment_list.xml
Normal file
135
app/src/main/res/layout/fragment_character_comment_list.xml
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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="wrap_content"
|
||||
android:background="@drawable/bg_top_round_corner_16_7_222222">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/rl_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="13.3dp"
|
||||
android:fontFamily="@font/gmarket_sans_medium"
|
||||
android:text="댓글"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14.7sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_close"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_comment_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6.7dp"
|
||||
android:layout_toEndOf="@+id/tv_title"
|
||||
android:fontFamily="@font/gmarket_sans_medium"
|
||||
android:textColor="@color/color_909090"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_close"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_title"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_close"
|
||||
tools:text="1,204" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="12dp"
|
||||
android:contentDescription="@null"
|
||||
android:paddingHorizontal="13.3dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:src="@drawable/ic_circle_x_white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@+id/rl_toolbar"
|
||||
android:layout_marginHorizontal="13.3dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="#78909C" />
|
||||
|
||||
<!-- 캐릭터 상세의 댓글 입력 폼과 동일하게 표시 (간단화 버전) -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_comment_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/divider"
|
||||
android:background="@drawable/bg_top_round_corner_8_222222"
|
||||
android:elevation="13.3dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="13.3dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_comment_profile"
|
||||
android:layout_width="33.3dp"
|
||||
android:layout_height="33.3dp"
|
||||
android:contentDescription="@null"
|
||||
tools:src="@drawable/ic_placeholder_profile" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_input_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_round_corner_10_232323_3bb9f1"
|
||||
android:hint="댓글을 입력해 보세요"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="text|textMultiLine"
|
||||
android:paddingVertical="13.3dp"
|
||||
android:paddingStart="13.3dp"
|
||||
android:paddingEnd="50.7dp"
|
||||
android:textColor="@color/color_eeeeee"
|
||||
android:textColorHint="@color/color_777777"
|
||||
android:textCursorDrawable="@drawable/edit_text_cursor"
|
||||
android:textSize="13.3sp"
|
||||
tools:ignore="LabelFor" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_comment_send"
|
||||
android:layout_width="33.3dp"
|
||||
android:layout_height="33.3dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/btn_message_send" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/divider2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@+id/ll_comment_input"
|
||||
android:layout_marginHorizontal="13.3dp"
|
||||
android:background="#78909C" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_below="@+id/divider2"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:clipToPadding="false"
|
||||
android:padding="13.3dp" />
|
||||
</RelativeLayout>
|
||||
93
app/src/main/res/layout/item_character_comment.xml
Normal file
93
app/src/main/res/layout/item_character_comment.xml
Normal file
@@ -0,0 +1,93 @@
|
||||
<?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="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_comment_profile"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:contentDescription="@null"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_placeholder_profile" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_comment_nickname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toStartOf="@+id/iv_menu"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_comment_profile"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_comment_profile">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_comment_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/pretendard_bold"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
tools:text="닉네임" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_menu"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_seemore_vertical_white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_comment_profile" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_comment_date"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="@font/pretendard_regular"
|
||||
android:textColor="@color/color_b0bec5"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/ll_comment_nickname"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_comment_nickname"
|
||||
tools:text="2시간전" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_comment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/pretendard_regular"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_comment_date"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_comment_date"
|
||||
tools:text="댓글 내용이 표시됩니다." />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_write_reply"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/pretendard_bold"
|
||||
android:text="답글 쓰기"
|
||||
android:textColor="@color/color_3bb9f1"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_comment"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_comment" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="#78909C"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_write_reply" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user