Fixed grid size of first song set to 1
This commit is contained in:
parent
5005e91b1c
commit
7c0701efad
1 changed files with 1 additions and 7 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue