Skip to content

Instantly share code, notes, and snippets.

@pawegio
Last active January 19, 2017 23:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pawegio/3f4f9f2168f9dc739af73ec80c3cff8b to your computer and use it in GitHub Desktop.
Save pawegio/3f4f9f2168f9dc739af73ec80c3cff8b to your computer and use it in GitHub Desktop.
typealias ItemAction = (Item, Int, Boolean) -> Unit
open class ViewHolder(view: View, val action: ItemAction? = null) : RecyclerView.ViewHolder(view) {
// ...
}
class AViewHolder(view: View, action: ItemAction? = null) : ViewHolder(view, action) {
// ...
}
class BViewHolder(view: View, action: ItemAction? = null) : ViewHolder(view, action) {
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment