User RecyclerView
with GridLayoutManager
that have set SpanSizeLookup
. So it will be as 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);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…