androidx viewholder code example
Example: 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
}
}