aboutsummaryrefslogtreecommitdiff
path: root/fastadapter
diff options
context:
space:
mode:
Diffstat (limited to 'fastadapter')
-rw-r--r--fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt6
-rw-r--r--fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt2
2 files changed, 4 insertions, 4 deletions
diff --git a/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt b/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt
index 47c465c..f9f06b9 100644
--- a/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt
+++ b/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt
@@ -46,18 +46,18 @@ import com.mikepenz.iconics.typeface.IIcon
*/
class CardIItem(
val builder: Config.() -> Unit = {}
-) : KauIItem<CardIItem, CardIItem.ViewHolder>(
+) : KauIItem< CardIItem.ViewHolder>(
R.layout.kau_iitem_card, ::ViewHolder, R.id.kau_item_card
), ThemableIItem by ThemableIItemDelegate() {
companion object {
fun bindClickEvents(fastAdapter: FastAdapter<IItem<*>>) {
- fastAdapter.withEventHook(object : ClickEventHook<IItem<*>>() {
+ fastAdapter.addEventHook(object : ClickEventHook<IItem<*>>() {
override fun onBindMany(viewHolder: RecyclerView.ViewHolder): List<View>? {
return if (viewHolder is ViewHolder) listOf(viewHolder.card, viewHolder.button) else null
}
- override fun onClick(v: View, position: Int, adapter: FastAdapter<IItem<*>>, item: IItem<*>) {
+ override fun onClick(v: View, position: Int, fastAdapter: FastAdapter<IItem<*>>, item: IItem<*>) {
if (item !is CardIItem) return
with(item.configs) {
when (v.id) {
diff --git a/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt b/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt
index 2c488b1..551cb59 100644
--- a/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt
+++ b/fastadapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt
@@ -34,7 +34,7 @@ import ca.allanwang.kau.utils.string
class HeaderIItem(
text: String? = null,
var textRes: Int = INVALID_ID
-) : KauIItem<HeaderIItem, HeaderIItem.ViewHolder>(
+) : KauIItem<HeaderIItem.ViewHolder>(
R.layout.kau_iitem_header, { ViewHolder(it) }, R.id.kau_item_header_big_margin_top
), ThemableIItem by ThemableIItemDelegate() {