Skip to content

Commit

Permalink
Merge pull request #4 from carousell/feature/reorder
Browse files Browse the repository at this point in the history
Reorder parameter
  • Loading branch information
Jintin authored Nov 23, 2020
2 parents 29efc50 + ff72587 commit e58db86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class MainActivity : AppCompatActivity() {
)
)
val layoutManager = GridLayoutManager(this, spanCount, GridLayoutManager.VERTICAL, false)
layoutManager.spanSizeLookup = ConcatSpanSizeLookup({ adapter.adapters }, spanCount)
layoutManager.spanSizeLookup = ConcatSpanSizeLookup(spanCount) { adapter.adapters }
recyclerView.layoutManager = layoutManager

recyclerView.addItemDecoration(ConcatItemDecoration { adapter.adapters })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ interface SpanSizeLookupOwner {
}

class ConcatSpanSizeLookup(
private val adaptersProvider: () -> List<RecyclerView.Adapter<*>>,
private val spanCount: Int
private val spanCount: Int,
private val adaptersProvider: () -> List<RecyclerView.Adapter<*>>
) :
GridLayoutManager.SpanSizeLookup() {

Expand Down

0 comments on commit e58db86

Please sign in to comment.