Greetings!
I'm trying to use this lib with GridLayoutManager.
But when I've done this, the result was not as I expected.



When all tabs are expanded thats fine. In other cases it's looked wired.
I use this code in my Activity.
final GridLayoutManager manager = new GridLayoutManager(this, 2);
recycler.setLayoutManager(manager);
final PeopleAdapter adapter = new PeopleAdapter(this);
recycler.setAdapter(adapter);
manager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
return adapter.isHeader(position) ? manager.getSpanCount() : 1;
}
});
Greetings!
I'm trying to use this lib with GridLayoutManager.
But when I've done this, the result was not as I expected.
When all tabs are expanded thats fine. In other cases it's looked wired.
I use this code in my Activity.