2016-03-25 11 views

Odpowiedz

11

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); 
} 
+0

Drogi @Ravi Teja Co to jest rlm? –

+0

wystąpienie menedżera układu, które można przekazać w konstruktorze adaptera, ma metodę ustawiającą w adapterze –

+0

co, jeśli masz 3 kolby? – Shine

Powiązane problemy