A layout manager for the RecyclerView with interchangeable linear, grid, and staggered displays of views, all with configurable section headers including the sticky variety as specified in the material design docs.
I've been working through the demo and still can't figure out where the margin of the main items gets set. More specifically, the text_line_item.xml is inflated and has an offset applied to it - I want to change that offset.
I have modified the example to use LinearSLM instead of the grid:
public void onBindViewHolder(CountryViewHolder holder, int position) {
final LineItem item = mItems.get(position);
final View itemView = holder.itemView;
holder.bindItem(item.text);
final LayoutManager.LayoutParams lp = LayoutManager.LayoutParams.from(itemView.getLayoutParams());
lp.setSlm(LinearSLM.ID);
lp.setFirstPosition(item.sectionFirstPosition);
itemView.setLayoutParams(lp);
}
I've been working through the demo and still can't figure out where the margin of the main items gets set. More specifically, the
text_line_item.xml
is inflated and has an offset applied to it - I want to change that offset.I have modified the example to use
LinearSLM
instead of the grid:Thx