You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@EpoxyModelClass(layout = R.layout.singlefood_layout)
abstract class HotelItemModel (@EpoxyAttribute var food: Food) : EpoxyModelWithHolder<HotelItemModel.FoodHolder>(){
override fun bind(holder: FoodHolder) {
holder.imageView.setImageResource(food.image)
holder.titleView.text = food.title
}
/**
* This is ViewHolder class equivalent to Google's RecyclerView.ViewHolder class
*/
inner class FoodHolder : KotlinHolder(){
val imageView by bind<ImageView>(R.id.image)
val titleView by bind<TextView>(R.id.title)
val descView by bind<TextView>(R.id.desc)
}
}`
The text was updated successfully, but these errors were encountered:
I want to use Epoxy for my recyclerView with kotlin, but Epoxy Model does not generate HotelItemModel_() class, what wrong with it?
`import android.widget.ImageView
import android.widget.TextView
import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass
import com.airbnb.epoxy.EpoxyModelWithHolder
import io.navendra.nachos.R
import io.navendra.nachos.models.Food
@EpoxyModelClass(layout = R.layout.singlefood_layout)
abstract class HotelItemModel (@EpoxyAttribute var food: Food) : EpoxyModelWithHolder<HotelItemModel.FoodHolder>(){
}`
The text was updated successfully, but these errors were encountered: