콘텐츠 리스트
- 소장중 / 대여중 / Sold Out 표시
This commit is contained in:
@@ -40,23 +40,37 @@ class AudioContentAdapter(
|
||||
binding.tvLikeCount.text = item.likeCount.moneyFormat()
|
||||
binding.tvCommentCount.text = item.commentCount.moneyFormat()
|
||||
|
||||
binding.tvPrice.visibility = View.GONE
|
||||
binding.tvOwned.visibility = View.GONE
|
||||
binding.tvRented.visibility = View.GONE
|
||||
binding.tvSoldOut.visibility = View.GONE
|
||||
|
||||
binding.tvScheduledToOpen.visibility = if (item.isScheduledToOpen) {
|
||||
View.VISIBLE
|
||||
} else {
|
||||
View.GONE
|
||||
}
|
||||
|
||||
if (item.price < 1) {
|
||||
binding.tvPrice.text = "무료"
|
||||
binding.tvPrice.setCompoundDrawables(null, null, null, null)
|
||||
if (item.isOwned) {
|
||||
binding.tvOwned.visibility = View.VISIBLE
|
||||
} else if (item.isRented) {
|
||||
binding.tvRented.visibility = View.VISIBLE
|
||||
} else if (item.isSoldOut) {
|
||||
binding.tvSoldOut.visibility = View.VISIBLE
|
||||
} else {
|
||||
binding.tvPrice.text = item.price.moneyFormat()
|
||||
binding.tvPrice.setCompoundDrawablesWithIntrinsicBounds(
|
||||
R.drawable.ic_can,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
)
|
||||
binding.tvPrice.visibility = View.VISIBLE
|
||||
if (item.price < 1) {
|
||||
binding.tvPrice.text = "무료"
|
||||
binding.tvPrice.setCompoundDrawables(null, null, null, null)
|
||||
} else {
|
||||
binding.tvPrice.text = item.price.moneyFormat()
|
||||
binding.tvPrice.setCompoundDrawablesWithIntrinsicBounds(
|
||||
R.drawable.ic_can,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
binding.root.setOnClickListener { onClickItem(item.contentId) }
|
||||
|
||||
@@ -81,7 +81,10 @@ data class GetAudioContentListItem(
|
||||
@SerializedName("commentCount") val commentCount: Int,
|
||||
@SerializedName("isPin") val isPin: Boolean,
|
||||
@SerializedName("isAdult") val isAdult: Boolean,
|
||||
@SerializedName("isScheduledToOpen") val isScheduledToOpen: Boolean
|
||||
@SerializedName("isScheduledToOpen") val isScheduledToOpen: Boolean,
|
||||
@SerializedName("isRented") val isRented: Boolean,
|
||||
@SerializedName("isOwned") val isOwned: Boolean,
|
||||
@SerializedName("isSoldOut") val isSoldOut: Boolean
|
||||
)
|
||||
|
||||
data class GetCreatorActivitySummary(
|
||||
|
||||
Reference in New Issue
Block a user