From 3a1943ba8734e29f6ab22099e171fb2d1a732567 Mon Sep 17 00:00:00 2001 From: klaus Date: Wed, 20 Aug 2025 18:38:16 +0900 Subject: [PATCH] =?UTF-8?q?refactor(character-comment):=20=EC=BA=90?= =?UTF-8?q?=EB=A6=AD=ED=84=B0=20=EB=8C=93=EA=B8=80/=EB=8B=B5=EA=B8=80=20?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 배경색 변경 - 댓글 사이 간격 조정 --- .../comment/CharacterCommentListFragment.kt | 16 ++-- .../comment/CharacterCommentReplyFragment.kt | 15 ++-- .../bg_top_round_corner_15_263238.xml | 7 ++ .../fragment_character_comment_list.xml | 80 +++++++++---------- .../fragment_character_comment_reply.xml | 79 +++++++++--------- .../res/layout/item_character_comment.xml | 40 ++++------ .../layout/item_character_comment_reply.xml | 38 +++------ 7 files changed, 124 insertions(+), 151 deletions(-) create mode 100644 app/src/main/res/drawable/bg_top_round_corner_15_263238.xml diff --git a/app/src/main/java/kr/co/vividnext/sodalive/chat/character/comment/CharacterCommentListFragment.kt b/app/src/main/java/kr/co/vividnext/sodalive/chat/character/comment/CharacterCommentListFragment.kt index d44f287d..36fdeafa 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/chat/character/comment/CharacterCommentListFragment.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/chat/character/comment/CharacterCommentListFragment.kt @@ -125,23 +125,23 @@ class CharacterCommentListFragment : BaseFragment { - outRect.top = 13.3f.dpToPx().toInt() - outRect.bottom = 6.7f.dpToPx().toInt() + outRect.top = 24f.dpToPx().toInt() + outRect.bottom = 12f.dpToPx().toInt() } adapter.itemCount - 1 -> { - outRect.top = 6.7f.dpToPx().toInt() - outRect.bottom = 13.3f.dpToPx().toInt() + outRect.top = 12f.dpToPx().toInt() + outRect.bottom = 24f.dpToPx().toInt() } else -> { - outRect.top = 6.7f.dpToPx().toInt() - outRect.bottom = 6.7f.dpToPx().toInt() + outRect.top = 24f.dpToPx().toInt() + outRect.bottom = 24f.dpToPx().toInt() } } } diff --git a/app/src/main/java/kr/co/vividnext/sodalive/chat/character/comment/CharacterCommentReplyFragment.kt b/app/src/main/java/kr/co/vividnext/sodalive/chat/character/comment/CharacterCommentReplyFragment.kt index 6e086d0e..afbccabb 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/chat/character/comment/CharacterCommentReplyFragment.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/chat/character/comment/CharacterCommentReplyFragment.kt @@ -7,7 +7,6 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.view.inputmethod.InputMethodManager -import android.widget.Toast import androidx.appcompat.app.AlertDialog import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView @@ -136,23 +135,27 @@ class CharacterCommentReplyFragment : BaseFragment { - outRect.top = 13.3f.dpToPx().toInt(); outRect.bottom = 12f.dpToPx().toInt() + outRect.top = 24f.dpToPx().toInt(); + outRect.bottom = 12f.dpToPx().toInt() } adapter.itemCount - 1 -> { - outRect.top = 12f.dpToPx().toInt(); outRect.bottom = 13.3f.dpToPx().toInt() + outRect.top = 12f.dpToPx().toInt() + outRect.bottom = 24f.dpToPx().toInt() } else -> { - outRect.top = 12f.dpToPx().toInt(); outRect.bottom = 12f.dpToPx().toInt() + outRect.top = 12f.dpToPx().toInt() + outRect.bottom = 12f.dpToPx().toInt() } } } }) + recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() { override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { super.onScrolled(recyclerView, dx, dy) diff --git a/app/src/main/res/drawable/bg_top_round_corner_15_263238.xml b/app/src/main/res/drawable/bg_top_round_corner_15_263238.xml new file mode 100644 index 00000000..647ae2ea --- /dev/null +++ b/app/src/main/res/drawable/bg_top_round_corner_15_263238.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/app/src/main/res/layout/fragment_character_comment_list.xml b/app/src/main/res/layout/fragment_character_comment_list.xml index e052f3e3..b702a584 100644 --- a/app/src/main/res/layout/fragment_character_comment_list.xml +++ b/app/src/main/res/layout/fragment_character_comment_list.xml @@ -4,7 +4,7 @@ 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"> + android:background="@drawable/bg_top_round_corner_15_263238"> - - + android:orientation="horizontal"> - + 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"> + 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" /> - + android:src="@drawable/ic_message_send" /> + + android:clipToPadding="false" /> diff --git a/app/src/main/res/layout/fragment_character_comment_reply.xml b/app/src/main/res/layout/fragment_character_comment_reply.xml index dbeb27f8..cd316a9e 100644 --- a/app/src/main/res/layout/fragment_character_comment_reply.xml +++ b/app/src/main/res/layout/fragment_character_comment_reply.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@drawable/bg_top_round_corner_16_7_222222"> + android:background="@drawable/bg_top_round_corner_15_263238"> - - + android:orientation="horizontal"> - + 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"> + 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" /> - + android:src="@drawable/ic_message_send" /> + + android:clipToPadding="false" /> diff --git a/app/src/main/res/layout/item_character_comment.xml b/app/src/main/res/layout/item_character_comment.xml index dbcdb4ce..f2830c1d 100644 --- a/app/src/main/res/layout/item_character_comment.xml +++ b/app/src/main/res/layout/item_character_comment.xml @@ -32,6 +32,16 @@ android:textColor="@color/white" android:textSize="14sp" tools:text="닉네임" /> + + - - + app:layout_constraintStart_toStartOf="@+id/ll_comment_nickname" + app:layout_constraintTop_toBottomOf="@+id/ll_comment_nickname" + tools:text="답글 내용이 표시됩니다." /> - - diff --git a/app/src/main/res/layout/item_character_comment_reply.xml b/app/src/main/res/layout/item_character_comment_reply.xml index abf37221..45acc4f3 100644 --- a/app/src/main/res/layout/item_character_comment_reply.xml +++ b/app/src/main/res/layout/item_character_comment_reply.xml @@ -33,6 +33,16 @@ android:textColor="@color/white" android:textSize="14sp" tools:text="닉네임" /> + + - - - -