Created
March 26, 2020 13:15
-
-
Save mustafayigitt/cd47e697d89b08c7f6ba761cd10e6765 to your computer and use it in GitHub Desktop.
recyclerview adapter class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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