Slide 14
Slide 14 text
ModelにViewTypeを持たせる
data class ABModel(val viewType: CustomAdapter.ViewType,
val name: String,
val imageUrl: String)
14
ViewType AとBで共通で使用できるModelにViewTypeを持たせ
る
ViewType A → 一行のView
ViewType B → 二行のView
enum class ViewType(val type: Int) {
A(111),
B(112)
}