CymChad / BaseRecyclerViewAdapterHelper

BRVAH:Powerful and flexible RecyclerAdapter
http://www.recyclerview.org/
MIT License
24.29k stars 5.15k forks source link

集成XRecyclerView,用BaseQuickAdapter的话,adapter下标从1开始,自己写Adapter没有问题 #490

Closed findvoid closed 7 years ago

findvoid commented 7 years ago

如题: XRecyclerView:https://github.com/jianghejie/XRecyclerView

CymChad commented 7 years ago

BRVAH的下标是使用的getLayoutPosition拿到的,你是不是有头部?

CymChad commented 7 years ago

不建议组合使用,因为BRVAH没有适配过XRecyclerView,XRecyclerView也没适配过BRVAH

findvoid commented 7 years ago

使用getAdapterPosition()是不是好一些?

CymChad commented 7 years ago

getLayoutPosition 拿到的是position是事实的,比如你rm了一个item,他就会减去你的item坐标,更新所有item的坐标,如果你只是getPosition就算你rm了一个item,他的坐标是不会刷新的,所以会导致有问题。