aboutsummaryrefslogtreecommitdiff
path: root/fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-10-24 17:45:09 -0700
committerAllan Wang <me@allanwang.ca>2021-10-24 17:45:09 -0700
commit222709bc15ace77ebf03e5a8e17e0bf026520970 (patch)
tree802f80dc3e6956b9e8bdf15f4d265f3b863fa58d /fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter
parent8c95d32ce4a82ec00590c428d163a3604b7d44ec (diff)
downloadkau-222709bc15ace77ebf03e5a8e17e0bf026520970.tar.gz
kau-222709bc15ace77ebf03e5a8e17e0bf026520970.tar.bz2
kau-222709bc15ace77ebf03e5a8e17e0bf026520970.zip
Many version bumps
Diffstat (limited to 'fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter')
-rw-r--r--fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter/viewbinding/BindingItem.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter/viewbinding/BindingItem.kt b/fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter/viewbinding/BindingItem.kt
index ff694f0..a289dc8 100644
--- a/fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter/viewbinding/BindingItem.kt
+++ b/fastadapter-viewbinding/src/main/kotlin/ca/allanwang/fastadapter/viewbinding/BindingItem.kt
@@ -42,8 +42,8 @@ interface BindingLayout<Binding : ViewBinding> {
}
abstract class BindingItem<Binding : ViewBinding>(open val data: Any?) :
- AbstractItem<BindingItem.ViewHolder>(),
- BindingLayout<Binding> {
+ AbstractItem<BindingItem.ViewHolder>(),
+ BindingLayout<Binding> {
override val type: Int
get() = layoutRes
@@ -81,7 +81,7 @@ abstract class BindingItem<Binding : ViewBinding>(open val data: Any?) :
open fun Binding.unbindView(holder: ViewHolder) {}
final override fun getViewHolder(v: View): ViewHolder =
- ViewHolder(v, layoutRes)
+ ViewHolder(v, layoutRes)
override fun failedToRecycle(holder: ViewHolder): Boolean {
KL.e { "Failed to recycle" }
@@ -97,7 +97,7 @@ abstract class BindingItem<Binding : ViewBinding>(open val data: Any?) :
override fun hashCode(): Int = data.hashCode()
class ViewHolder(itemView: View, internal val layoutRes: Int) :
- RecyclerView.ViewHolder(itemView) {
+ RecyclerView.ViewHolder(itemView) {
/**
* Retrieves a binding.
@@ -119,7 +119,7 @@ abstract class BindingItem<Binding : ViewBinding>(open val data: Any?) :
}
abstract class BindingClickEventHook<Binding : ViewBinding, Item : BindingItem<Binding>>(val identifier: BindingLayout<Binding>) :
- ClickEventHook<Item>() {
+ ClickEventHook<Item>() {
private fun RecyclerView.ViewHolder.binding(): Binding? {
val holder = this as? BindingItem.ViewHolder ?: return null
@@ -146,7 +146,7 @@ abstract class BindingClickEventHook<Binding : ViewBinding, Item : BindingItem<B
}
open fun Binding.onBindMany(viewHolder: RecyclerView.ViewHolder): List<View>? =
- super.onBindMany(viewHolder)
+ super.onBindMany(viewHolder)
final override fun onClick(v: View, position: Int, fastAdapter: FastAdapter<Item>, item: Item) {
BindingItem.getBinding<Binding>(v).onClick(v, position, fastAdapter, item)