I am developing an android app that will have a screen similar to the following image - >
On my opinion, the best way to do it is to use RecyclerView with GridLayoutManager. Simply provide SpanSizeLookup for GridLayoutManager that can determine size of each position. For example, first position need to ocupate full row
//Two items in a row
int spanCount = 2;
GridLayoutManager manager = new GridLayoutManager(getActivity(),spanCount);
manager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
return (position == 0 ? spanCount : 1);
}
});
In your adapter provide 2 types of items - usual item and advertisement item
It is preferable to set item paddings via ItemDecoration.
I can provide more code if needed