aboutsummaryrefslogtreecommitdiff
path: root/adapter/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'adapter/src/main')
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt4
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt2
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt1
3 files changed, 4 insertions, 3 deletions
diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt
index 9865c70..6ce81a3 100644
--- a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt
@@ -27,7 +27,7 @@ import com.mikepenz.iconics.typeface.IIcon
class CardIItem(
val builder: Config.() -> Unit = {}
) : KauIItem<CardIItem, CardIItem.ViewHolder>(
- R.layout.kau_iitem_card, { ViewHolder(it) }, R.id.kau_item_card
+ R.layout.kau_iitem_card, ::ViewHolder, R.id.kau_item_card
), ThemableIItem by ThemableIItemDelegate() {
companion object {
@@ -69,7 +69,7 @@ class CardIItem(
var imageRes: Int = -1
}
- override fun bindView(holder: ViewHolder, payloads: MutableList<Any>?) {
+ override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) {
super.bindView(holder, payloads)
with(holder.itemView.context) context@ {
with(configs) {
diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt
index d6d06f3..8367e7c 100644
--- a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt
@@ -24,7 +24,7 @@ class HeaderIItem(
var text: String = text ?: "Header Placeholder"
- override fun bindView(holder: ViewHolder, payloads: MutableList<Any>?) {
+ override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) {
super.bindView(holder, payloads)
holder.text.text = holder.itemView.context.string(textRes, text)
bindTextColor(holder.text)
diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt
index d8567c4..335b89c 100644
--- a/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt
@@ -21,4 +21,5 @@ open class KauIItem<Item, VH : RecyclerView.ViewHolder>(
override final fun getType(): Int = type
override final fun getViewHolder(v: View): VH = viewHolder(v)
override final fun getLayoutRes(): Int = layoutRes
+
} \ No newline at end of file