Codewaves / Sticky-Header-Grid

Sticky header grid layout manager for RecycleView
MIT License
116 stars 33 forks source link

item span size does not work #6

Closed walterFeng closed 6 years ago

walterFeng commented 6 years ago

When first load data, if there have different spanSize of items in the same group, SpanSizeLookup will does not work.

can you help me to fix the issues, thank you very much!

Codewaves commented 6 years ago

Hi,

It is hard to say what is wrong without sample code. Make sure you are calculating span info correctly. Maybe if you describe the problem with more details, I can find where is the problem.

walterFeng commented 6 years ago

Hi, In you demo project, modify some code about LayoutManager.spanSizeLookup like this:

SampleActivity.java
...
...
 @Override
public int getSpanSize(int section, int position) {
     if (position > 2) {
        return 2;
      else {
        return 1;
      }
}

then, scroll recyclerView and you can get it. Please forgive me for my poor English ! thank you.

Codewaves commented 6 years ago

Thanks for the bug report. Fixed in 0.9.6

walterFeng commented 6 years ago

It works for me and looks very nice. thanks a lot!!