From ab240428634c866f44dd0a4ded1021e81abf8e58 Mon Sep 17 00:00:00 2001 From: klaus Date: Mon, 25 Dec 2023 23:51:02 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BB=A4=EB=AE=A4=EB=8B=88=ED=8B=B0=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EB=AC=BC=20-=20=EC=BD=98=ED=85=90=EC=B8=A0?= =?UTF-8?q?=20=EA=B8=80=20=EB=8D=94=EB=B3=B4=EA=B8=B0=20=EA=B8=B0=EB=8A=A5?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator_community/GetCommunityPostListResponse.kt | 3 ++- .../all/CreatorCommunityAllAdapter.kt | 11 +++++++++++ .../main/res/layout/item_creator_community_all.xml | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/GetCommunityPostListResponse.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/GetCommunityPostListResponse.kt index 501d78a..3149d56 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/GetCommunityPostListResponse.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/GetCommunityPostListResponse.kt @@ -15,5 +15,6 @@ data class GetCommunityPostListResponse( @SerializedName("isLike") var isLike: Boolean, @SerializedName("likeCount") val likeCount: Int, @SerializedName("commentCount") val commentCount: Int, - @SerializedName("firstComment") val firstComment: GetCommunityPostCommentListItem? + @SerializedName("firstComment") val firstComment: GetCommunityPostCommentListItem?, + @SerializedName("isExpand") var isExpand: Boolean = false ) diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/CreatorCommunityAllAdapter.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/CreatorCommunityAllAdapter.kt index 2cad479..3410034 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/CreatorCommunityAllAdapter.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/creator_community/all/CreatorCommunityAllAdapter.kt @@ -41,6 +41,17 @@ class CreatorCommunityAllAdapter( } binding.tvContent.text = item.content + binding.tvContent.setOnClickListener { + items[index] = items[index].copy( + isExpand = !item.isExpand, + ) + notifyDataSetChanged() + } + binding.tvContent.maxLines = if (item.isExpand) { + Int.MAX_VALUE + } else { + 3 + } binding.ivSeeMore.setOnClickListener { showOptionMenu( diff --git a/app/src/main/res/layout/item_creator_community_all.xml b/app/src/main/res/layout/item_creator_community_all.xml index 6b91ba3..e256c79 100644 --- a/app/src/main/res/layout/item_creator_community_all.xml +++ b/app/src/main/res/layout/item_creator_community_all.xml @@ -65,6 +65,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="13.3dp" + android:ellipsize="end" android:fontFamily="@font/gmarket_sans_medium" android:maxLines="3" android:textColor="@color/color_bbbbbb" @@ -83,9 +84,9 @@ android:id="@+id/ll_like" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="13.3dp" android:background="@drawable/bg_round_corner_26_7_19ffffff" android:gravity="center" - android:layout_marginTop="13.3dp" android:orientation="horizontal" android:paddingHorizontal="13.3dp" android:paddingVertical="5.3dp"