I want to create different sizes of rows. when i use GridLayoutManager.SpanSizeLookup i can like this:
mGridLayout.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
switch (adapter.getItemViewType(position)) {
case TYPE_PAGE_VIEWER:
return 1;
default:
return 2;
}
}
});
but with the one in your library it does not return position so i cant have different row sizes.
the one in your library looks like this:
setLoadingListItemSpanSizeLookup(new LoadingListItemSpanLookup() {
@Override
public int getSpanSize() {
return 2; //i want to change this dynamically but no position is passed in like googles
}
})
my goal is to have a gridlayout that uses your library but that i can have different size rows . for example first row had 3 items but 5th row can have 5 items. etc.
I want to create different sizes of rows. when i use GridLayoutManager.SpanSizeLookup i can like this:
but with the one in your library it does not return position so i cant have different row sizes.
the one in your library looks like this:
my goal is to have a gridlayout that uses your library but that i can have different size rows . for example first row had 3 items but 5th row can have 5 items. etc.