lucasr / twoway-view

[DEPRECATED] RecyclerView made simple
5.23k stars 1.02k forks source link

Inability to set numcolumns and numrows programmatically #220

Closed Deepscorn closed 9 years ago

Deepscorn commented 9 years ago

The only way to set them now is to set them in xml: app:twowayview_numColumns="15" app:twowayview_numRows="25" Correct me, if I'm wrong

gioffy commented 9 years ago

Right now, I'm using this approach to declare the number of columns.

mLayoutManager = new SpannableGridLayoutManager(TwoWayLayoutManager.Orientation.VERTICAL,colsCount,rowsCount);
mRecyclerView.setLayoutManager(mLayoutManager);

I don't know your use case so I can't answer a better way.

Deepscorn commented 9 years ago

It works! Thank you!