Home > Mobile >  RecyclerView adapter onBindViewHolder method is carried out
RecyclerView adapter onBindViewHolder method is carried out

Time:10-07

Adapter is heavy, the number of data collection is eight, getItemCount method of return is eight, but onBindViewHolder method is executed only once, data shows the first, only, refer to the great god, when will be the problem

CodePudding user response:

If the item is too high, do not display the data, the article 2 loads will only display the first, after sliding onBindViewHolder trigger the second data

CodePudding user response:

Estimates that you set up a view in a row, you slide a slide, see to see other views

CodePudding user response:

Your Item base board height setting is match_parent?

CodePudding user response:

Problem has been resolved, the most stupid solution, rewrite the adapter, said the same code, rewrite some of that

CodePudding user response:

To set the height of the item is match_parent, the current view can only see the first entry. Super hard, I also went to onBindViewHolder to find the reason, see comments to slapping his face suddenly, not a long memory.

CodePudding user response:

Your itemView highly estimated set to match_parent
  • Related