parent
c23ef771be
commit
f8fd06706b
|
@ -22,6 +22,12 @@ class AudioContentAdapter(
|
||||||
private val binding: ItemAudioContentBinding
|
private val binding: ItemAudioContentBinding
|
||||||
) : RecyclerView.ViewHolder(binding.root) {
|
) : RecyclerView.ViewHolder(binding.root) {
|
||||||
fun bind(item: GetAudioContentListItem) {
|
fun bind(item: GetAudioContentListItem) {
|
||||||
|
binding.ivPin.visibility = if (item.isPin) {
|
||||||
|
View.VISIBLE
|
||||||
|
} else {
|
||||||
|
View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
binding.ivCover.load(item.coverImageUrl) {
|
binding.ivCover.load(item.coverImageUrl) {
|
||||||
crossfade(true)
|
crossfade(true)
|
||||||
placeholder(R.drawable.bg_placeholder)
|
placeholder(R.drawable.bg_placeholder)
|
||||||
|
|
|
@ -76,6 +76,7 @@ data class GetAudioContentListItem(
|
||||||
@SerializedName("duration") val duration: String?,
|
@SerializedName("duration") val duration: String?,
|
||||||
@SerializedName("likeCount") val likeCount: Int,
|
@SerializedName("likeCount") val likeCount: Int,
|
||||||
@SerializedName("commentCount") val commentCount: Int,
|
@SerializedName("commentCount") val commentCount: Int,
|
||||||
|
@SerializedName("isPin") val isPin: Boolean,
|
||||||
@SerializedName("isAdult") val isAdult: Boolean,
|
@SerializedName("isAdult") val isAdult: Boolean,
|
||||||
@SerializedName("isScheduledToOpen") val isScheduledToOpen: Boolean
|
@SerializedName("isScheduledToOpen") val isScheduledToOpen: Boolean
|
||||||
)
|
)
|
||||||
|
|
|
@ -68,6 +68,15 @@
|
||||||
android:textSize="8sp"
|
android:textSize="8sp"
|
||||||
tools:ignore="SmallSp"
|
tools:ignore="SmallSp"
|
||||||
tools:text="00:30:20" />
|
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>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
Loading…
Reference in New Issue