android - recyclerview上下滑动时,item重用错乱如何解决?
黄舟
黄舟 2017-04-17 16:38:44
0
4
625
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(4)
Peter_Zhu

In reusing controls, the most important detail is: if there is an if, there must be an else

刘奇

Add code that specifies the selected state to Onbindholder. As mentioned above, the selected state must be set whether it is true or false.

Ty80
  1. View cache reuse problem. Use if else to handle it differentlyif else做不同处理

  2. 不同类型item 重写 getItemViewType()

Rewrite getItemViewType() for different types of items🎜🎜 🎜
伊谢尔伦

Look at my article, although it is not recyclerview, you can refer to it: https://segmentfault.com/a/1190000004906...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template