1

I'm using my own custome LinearLayoutManager for the RecyclerView. I need to dynamically add one view if user scroll or move the list by button. When getViewByPosition is called, the onBindViewHolder is called also. And then, onLayoutChildren is also called every time when the list scrolls by one position.

Any one knows the potential reason for this? Thanks

tainy
  • 951
  • 7
  • 19
  • Yes, this is how the layout system works. If a child requests a layout, all of its parents' layout will be called. – Muhammad Ammar May 12 '21 at 00:34
  • Thanks Muhammad. But every time the onLayoutChildren is called, the list just have a shake and not scroll smoothly. This is what I want to avoid. And Is this related to reused of the viewHolder? – tainy May 12 '21 at 01:34

0 Answers0