Skip to content

Instantly share code, notes, and snippets.

@vshkl
Created November 15, 2020 13:58
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 vshkl/24627c8178b699a495756368d65f94ea to your computer and use it in GitHub Desktop.
Save vshkl/24627c8178b699a495756368d65f94ea to your computer and use it in GitHub Desktop.
@EpoxyModelClass(layout = R.layout.item_model_header)
abstract class HeaderEpoxyModel : EpoxyModelWithHolder<HeaderViewHolder>() {
@EpoxyAttribute @StringRes var titleRes = 0
override fun bind(holder: HeaderViewHolder) {
holder.tvTitle.setText(titleRes)
}
class HeaderViewHolder : KotlinEpoxyHolder() {
val tvTitle by bind<TextView>(R.id.tv_title)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment