Skip to content

Instantly share code, notes, and snippets.

@dnnyg33
Last active May 26, 2020 18:18
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 dnnyg33/e7ef732d48abbf52573d5ee601cb885b to your computer and use it in GitHub Desktop.
Save dnnyg33/e7ef732d48abbf52573d5ee601cb885b to your computer and use it in GitHub Desktop.
A file template for creating an epoxy model
package ${PACKAGE_NAME}
import android.view.View
import com.airbnb.epoxy.EpoxyHolder
import com.airbnb.epoxy.EpoxyModelWithHolder
class ${NAME} : EpoxyModelWithHolder<${NAME}.ViewHolder>() {
inner class ViewHolder : KotlinEpoxyHolder() {
val title: TextView by bind(R.id.title)
}
override fun getDefaultLayout(): Int = R.layout.layout_${NAME}
override fun createNewHolder(): ViewHolder = ViewHolder()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment