Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Hello, such markup can be done using RecyclerView + GridLayoutManager.
For the GridLayoutManager, set a custom GridLayoutManager.SpanSizeLookup and determine how many cells the item will occupy in it. For example, like this:
RecyclerView recyclerView = (RecyclerView) findViewById(android.R.id.recycler);
//грид в 3 колонки
GridLayoutManager gridLayoutManager= new GridLayoutManager(context, 3);
gridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
return position == 0 ? 3 : 1;
}
});
recyclerView.setLayoutManager(gridLayoutManager);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question