@kirvel

DataBinding не работает в RecyclerViewAdapter(Android, Kotlin)?

Вот код функции OnBindViewHolder:
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
    val country = countries[position]
    var countryInfoCardBinding = DataBindingUtil.setContentView<CountryInfoCardBinding>(context as Activity, R.layout.country_info_card)
    countryInfoCardBinding.country = country
}

А вот XML файл:
https://pastebin.com/PySQFLmv
  • Вопрос задан
  • 42 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы