jeśli max kolumny są dwa, że byłoby dość simple.For zdania, że zajmują całą szerokość, setFullSpan (true), tak jak w metodzie Bindview z Recyclerview Adapter
//rlm is RecyclerView.LayoutManager passed in constructor or setter in adapter
if (rlm instanceof StaggeredGridLayoutManager) {
StaggeredGridLayoutManager.LayoutParams layoutParams = (StaggeredGridLayoutManager.LayoutParams) holder.itemView.getLayoutParams();
/*
* to make View to occupy full width of the parent
*/
layoutParams.setFullSpan(true);
}
Drogi @Ravi Teja Co to jest rlm? –
wystąpienie menedżera układu, które można przekazać w konstruktorze adaptera, ma metodę ustawiającą w adapterze –
co, jeśli masz 3 kolby? – Shine