Søren Krogh Neigaard
10/13/2017, 11:15 AMclass ProjectCellView : AnkoComponent<ViewGroup> {
var project: Project? = null
override fun createView(ui: AnkoContext<ViewGroup>): View {
return with(ui) {
verticalLayout {
textView {
text = project?.title
}
}
}
}
}
and my idea was to update its project
in a adapter.onBindViewHolder so that it would show the correct title, but I use it in createView
so that won´t work. What is the correct way to use a AnkoComponent
in a RecyclerView adapter and bind its view's to data in the adapter.onBindViewHolder?miha-x64
10/13/2017, 2:55 PM