I am finishing with the example Android application Real Estates on Mars. It was running well until
4) Task: Display a grid of images with RycyclerView
step 9. In MarsPropertyViewHolder, create a bind() method that takes a MarsProperty object as an argument and sets binding.property to that object. Call executePendingBindings() after setting the property, which causes the update to execute immediately.
see link here
I think I did it correctly:
class MarsPropertyViewHolder(private var binding:
GridViewItemBinding):
RecyclerView.ViewHolder(binding.root){
fun bind(marsProperty: MarsProperty) {
binding.property = marsProperty
binding.executePendingBindings()
}
}
I am getting one error while compiling the code:
cannot find symbol class class GridViewItemBindingImpl
Any advice on how to fix it?
4) Task: Display a grid of images with RycyclerView
step 9. In MarsPropertyViewHolder, create a bind() method that takes a MarsProperty object as an argument and sets binding.property to that object. Call executePendingBindings() after setting the property, which causes the update to execute immediately.
see link here
I think I did it correctly:
class MarsPropertyViewHolder(private var binding:
GridViewItemBinding):
RecyclerView.ViewHolder(binding.root){
fun bind(marsProperty: MarsProperty) {
binding.property = marsProperty
binding.executePendingBindings()
}
}
I am getting one error while compiling the code:
cannot find symbol class class GridViewItemBindingImpl
Any advice on how to fix it?