android - GridView: GridView with different cells sizes and layout, -
hi need gridview have 2 different layout in grid cells according grid cell type.here giving example scrren drawn on paper.
user recyclerview
gridlayoutmanager
have set spansizelookup
. follows:
int fullspansize = 3; int normalspansize = 1; gridlayoutmanager layout = new gridlayoutmanager(context, fullspansize); layout.setspanesizelookup(new gridlayoutmanager.spansizelookup() { @override public int getspansize(int position) { return position == 3 ? fullspansize : normalspansize; } }); recyclerview.setlayoutmanager(layout);
Comments
Post a Comment