Skip to content

Instantly share code, notes, and snippets.


Miguel Ángel Moreno nitrico

View GitHub Profile
nitrico / LastAdapter.kt
Created Jul 3, 2016
View LastAdapter.kt
class Builder<T : Any> internal constructor(private val list: List<T>, private val variable: Int) {
private val map: MutableMap<Class<*>, Int> = mutableMapOf()
private var handler: LayoutHandler? = null
private var onBind: OnBindListener? = null
private var onClick: OnClickListener? = null
private var onLongClick: OnLongClickListener? = null
inline fun <reified T : Any> map(@LayoutRes layout: Int) = map(, layout)