크리에이터 콘텐츠 리스트

- 고정 콘텐츠 핀 추가
This commit is contained in:
klaus 2024-01-29 00:48:45 +09:00
parent c23ef771be
commit f8fd06706b
3 changed files with 16 additions and 0 deletions

View File

@ -22,6 +22,12 @@ class AudioContentAdapter(
private val binding: ItemAudioContentBinding
) : RecyclerView.ViewHolder(binding.root) {
fun bind(item: GetAudioContentListItem) {
binding.ivPin.visibility = if (item.isPin) {
View.VISIBLE
} else {
View.GONE
}
binding.ivCover.load(item.coverImageUrl) {
crossfade(true)
placeholder(R.drawable.bg_placeholder)

View File

@ -76,6 +76,7 @@ data class GetAudioContentListItem(
@SerializedName("duration") val duration: String?,
@SerializedName("likeCount") val likeCount: Int,
@SerializedName("commentCount") val commentCount: Int,
@SerializedName("isPin") val isPin: Boolean,
@SerializedName("isAdult") val isAdult: Boolean,
@SerializedName("isScheduledToOpen") val isScheduledToOpen: Boolean
)

View File

@ -68,6 +68,15 @@
android:textSize="8sp"
tools:ignore="SmallSp"
tools:text="00:30:20" />
<ImageView
android:id="@+id/iv_pin"
android:layout_width="13.3dp"
android:layout_height="13.3dp"
android:layout_marginStart="8dp"
android:contentDescription="@null"
android:src="@drawable/ic_pin"
android:visibility="gone" />
</LinearLayout>
<TextView