Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
recyclerview adapter class
package com.mustafayigit.recyclerviewexample.ui.adapter
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.mustafayigit.recyclerviewexample.model.ProfileData
* Created By MUSTAFA
* on 26/03/2020
class ProfileDataAdapter(private val profileDataList: List<ProfileData>) :
RecyclerView.Adapter<ProfileDataViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ProfileDataViewHolder = ProfileDataViewHolder(parent)
override fun getItemCount(): Int = profileDataList.size
override fun onBindViewHolder(holder: ProfileDataViewHolder, position: Int) = holder.bind(profileDataList[position])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment