I am using MergeAdapter to combine 2 adapters It works fine .
Problem is for 1 adapter I need LinearLayoutManager with single column and for second adapter I need GridLayoutManager to show items in 2 columns . Is there any way to do it ?
I found a working solution(added below) by setting it to GridLayoutManager and span size based on position . I just want to know is there a better way to do this .
Set
GridLayoutManagertoRecyclerViewand span size based on position .In this case if position in mergeadapter is 0 then the only 1 column will be show come else 2 columns will be shown .