Closed NetylkinOV closed 3 years ago
@NetylkinOV yes this is possible.
See this example: https://github.com/mikepenz/FastAdapter/blob/develop/app/src/main/java/com/mikepenz/fastadapter/app/IconGridActivity.kt
Hi mikepenz, thank you so much for your help. The short answer is:
val gridLayoutManager = GridLayoutManager (this, 3)
gridLayoutManager.spanSizeLookup = object: GridLayoutManager.SpanSizeLookup () {
override fun getSpanSize (position: Int): Int {
return when (fastItemAdapter.getItemViewType (position)) {
R.id.fastadapter_expandable_item_id -> 3
R.id.fastadapter_icon_item_id -> 1
else -> -1
}
}
}
As I don't need an implementation with Expandable. I have been using your library for several years now, it's amazing how powerful it is.
I'm still waiting for the multiplatform kotlin version :)))
I wish you health and good luck :)
Happy I could help :) Thanks for the kind words
Hello mikepenz. Tell me is it possible to do it? Add 2 different items to RecyclerView with GridLayoutManager 2 columns. Check image. Thank you :)