Skip to content

AdapterMovieBinding class missing #7

@AnimeshVashistha

Description

@AnimeshVashistha

Correct the code AdapterMovieBinding is missing in MainAdapter.kt.
val binding = AdapterMovieBinding.inflate(inflater, parent, false)
return MainViewHolder(binding)
}

override fun onBindViewHolder(holder: MainViewHolder, position: Int) {
    val movie = movies[position]
    holder.binding.name.text = movie.name
    Glide.with(holder.itemView.context).load(movie.imageUrl).into(holder.binding.imageview)

}

override fun getItemCount(): Int {
    return movies.size
}

}

class MainViewHolder(val binding: AdapterMovieBinding) : RecyclerView.ViewHolder(binding.root) {

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions