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 501d78a6..3149d565 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 2cad4794..3410034c 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 6b91ba32..e256c793 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"