Answers for "viewholder"

1

viewholder

class PostsVH(itemView : View)
    : RecyclerView.ViewHolder(itemView)
{
    fun bind(get : UserPosts?) {
        itemView.txt_userId.text = get?.userId.toString()
        itemView.txt_id.text = get?.idPost.toString()
        itemView.txt_title.text = get?.title
        itemView.txt_body.text = get?.body
    }
}
Posted by: Guest on May-09-2020

Browse Popular Code Answers by Language