Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

databinding-nested-recyclerview-issue

ISSUE Expected Result
screenshot screenshot

Description

When databinding is used in nested recyclerview, as much as the number of last recyclerview item, the number of other recyclerview item is equally forced.

Code

   override fun onBindViewHolder(holder: ViewHolder, position: Int) {
       /**
       There is an issue when writing the code as follows.
       holder.onBind(data[position])
        or
       holder.binding.times = data[position]
       **/

       //If you write the code as follows, it works as expected.
       holder.binding.day.text = data[position].day
       holder.binding.time.text = "${data[position].startTime} - ${data[position].endTime}"
   }

   class ViewHolder(val binding: MyScheduleTimeListBinding) : RecyclerView.ViewHolder(binding.root) {
       fun onBind(data: MainActivity.Times) {
           binding.times = data
       }
   }

Issue Tracker

https://issuetracker.google.com/207003888

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages