RecyclerView GridLayoutManager span size for 3 elements
I have this code:
(binding.photos.layoutManager as GridLayoutManager).spanSizeLookup =
object : GridLayoutManager.SpanSizeLookup() {
override fun getSpanSize(position: Int): Int {
return when (messages.size) {
// how to use this
}
}
}
xml for my image:
I'm making a chat app where the user can send photos. There may be 3 cases:
When there is only one photo, the picture...