-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletions
9
.../polzzak_android/presentation/feature/link/management/item/LinkManagementMainEmptyItem.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
package com.polzzak_android.presentation.feature.link.management.item | ||
|
||
import androidx.annotation.DrawableRes | ||
import com.polzzak_android.R | ||
import com.polzzak_android.databinding.ItemLinkManagementMainEmptyBinding | ||
import com.polzzak_android.presentation.common.util.BindableItem | ||
|
||
class LinkManagementMainEmptyItem(private val content: String) : | ||
class LinkManagementMainEmptyItem( | ||
@DrawableRes private val imageDrawableRes: Int, | ||
val content: String | ||
) : | ||
BindableItem<ItemLinkManagementMainEmptyBinding>() { | ||
override val layoutRes: Int = R.layout.item_link_management_main_empty | ||
|
||
override fun areItemsTheSame(other: BindableItem<*>): Boolean = | ||
other is LinkManagementMainEmptyItem | ||
|
||
override fun areContentsTheSame(other: BindableItem<*>): Boolean = | ||
other is LinkManagementMainEmptyItem && this.content == other.content | ||
other is LinkManagementMainEmptyItem && this.content == other.content && this.imageDrawableRes == other.imageDrawableRes | ||
|
||
override fun bind(binding: ItemLinkManagementMainEmptyBinding, position: Int) { | ||
binding.tvContent.text = content | ||
binding.ivIcon.setImageResource(imageDrawableRes) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters