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 am creating recyclerview with Stickyheader and 5 other view types,I have written code
For header
final LayoutManager.LayoutParams params =LayoutManager.LayoutParams.from(itemView.getLayoutParams());
params.setSlm( LinearSLM.ID );
params.headerDisplay= LayoutManager.LayoutParams.HEADER_STICKY;
params.setFirstPosition(item.getFirstPos());//the value is set to pojo object
itemView.setLayoutParams(params);
for other viewtypes
final LayoutManager.LayoutParams params =LayoutManager.LayoutParams.from(itemView.getLayoutParams());
params.setSlm( LinearSLM.ID );
params.setFirstPosition(item.getFirstPos());//the value is set to pojo object
itemView.setLayoutParams(params);
Headers were not became sticky and I am getting error: W/SuperSLiM﹕ Null value passed in call to LayoutManager.LayoutParams.from().
Can you tell me.What I am doing wrong in above code.Please help me
I am creating recyclerview with Stickyheader and 5 other view types,I have written code
For header
final LayoutManager.LayoutParams params =LayoutManager.LayoutParams.from(itemView.getLayoutParams()); params.setSlm( LinearSLM.ID ); params.headerDisplay= LayoutManager.LayoutParams.HEADER_STICKY; params.setFirstPosition(item.getFirstPos());//the value is set to pojo object itemView.setLayoutParams(params);
for other viewtypes
final LayoutManager.LayoutParams params =LayoutManager.LayoutParams.from(itemView.getLayoutParams()); params.setSlm( LinearSLM.ID ); params.setFirstPosition(item.getFirstPos());//the value is set to pojo object itemView.setLayoutParams(params);
Headers were not became sticky and I am getting error: W/SuperSLiM﹕ Null value passed in call to LayoutManager.LayoutParams.from().
Can you tell me.What I am doing wrong in above code.Please help me