커뮤니티 게시물 - 콘텐츠 글 더보기 기능 추가
This commit is contained in:
parent
5d3891c1db
commit
ab24042863
|
@ -15,5 +15,6 @@ data class GetCommunityPostListResponse(
|
||||||
@SerializedName("isLike") var isLike: Boolean,
|
@SerializedName("isLike") var isLike: Boolean,
|
||||||
@SerializedName("likeCount") val likeCount: Int,
|
@SerializedName("likeCount") val likeCount: Int,
|
||||||
@SerializedName("commentCount") val commentCount: Int,
|
@SerializedName("commentCount") val commentCount: Int,
|
||||||
@SerializedName("firstComment") val firstComment: GetCommunityPostCommentListItem?
|
@SerializedName("firstComment") val firstComment: GetCommunityPostCommentListItem?,
|
||||||
|
@SerializedName("isExpand") var isExpand: Boolean = false
|
||||||
)
|
)
|
||||||
|
|
|
@ -41,6 +41,17 @@ class CreatorCommunityAllAdapter(
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.tvContent.text = item.content
|
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 {
|
binding.ivSeeMore.setOnClickListener {
|
||||||
showOptionMenu(
|
showOptionMenu(
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="13.3dp"
|
android:layout_marginTop="13.3dp"
|
||||||
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/gmarket_sans_medium"
|
android:fontFamily="@font/gmarket_sans_medium"
|
||||||
android:maxLines="3"
|
android:maxLines="3"
|
||||||
android:textColor="@color/color_bbbbbb"
|
android:textColor="@color/color_bbbbbb"
|
||||||
|
@ -83,9 +84,9 @@
|
||||||
android:id="@+id/ll_like"
|
android:id="@+id/ll_like"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="13.3dp"
|
||||||
android:background="@drawable/bg_round_corner_26_7_19ffffff"
|
android:background="@drawable/bg_round_corner_26_7_19ffffff"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:layout_marginTop="13.3dp"
|
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="13.3dp"
|
android:paddingHorizontal="13.3dp"
|
||||||
android:paddingVertical="5.3dp"
|
android:paddingVertical="5.3dp"
|
||||||
|
|
Loading…
Reference in New Issue