Fixed grid size of first song set to 1

main
Prathamesh More 2021-10-10 15:31:02 +05:30
parent 5005e91b1c
commit 7c0701efad
1 changed files with 1 additions and 7 deletions

View File

@ -70,13 +70,7 @@ class SongsFragment : AbsRecyclerViewCustomGridSizeFragment<SongAdapter, GridLay
} }
override fun createLayoutManager(): GridLayoutManager { override fun createLayoutManager(): GridLayoutManager {
return GridLayoutManager(requireActivity(), getGridSize()).apply { return GridLayoutManager(requireActivity(), getGridSize())
spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
override fun getSpanSize(position: Int): Int {
return if (position == 0) getGridSize() else 1
}
}
}
} }
override fun createAdapter(): SongAdapter { override fun createAdapter(): SongAdapter {