Skip to content

Instantly share code, notes, and snippets.

@muthuraj57
Created February 18, 2018 09:14
Show Gist options
  • Save muthuraj57/8aa7718452542c8bfee9f0540bc10de0 to your computer and use it in GitHub Desktop.
Save muthuraj57/8aa7718452542c8bfee9f0540bc10de0 to your computer and use it in GitHub Desktop.
class ExampleAdapter(
private val context: Context,
private val isAlternate: Boolean,
private val data: List<String>
) : RecyclerBaseAdapter() {
override fun getLayoutIdForPosition(position: Int) = R.layout.recycler_view_item
override fun getViewModel(position: Int) = ListItemViewModel(data[position])
override fun getItemCount() = data.size
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment