I want to display something like a RecyclerView
but the size is dynamically changing depending on how many items there are in the list. Each item is shown within the item's View
. There shouldn't need to be any scrolling in the view as the list view's height is set to the total height of how many item views there are.
Currently, I am using a RecyclerView
with the setHasFixedSize = false
as you can see in this snippet:
recyclerview.apply {
layoutManager = LinearLayoutManager(rootView.context)
adapter = PlanAdapter(dateItem.planItems)
setHasFixedSize(false)
}
which doesn't show any item after the first one. Here's an example screen where I've implemented it:
the blue highlights show that those items are there in the local storage, but is not shown by the dynamic RecyclerView that I made. There is a better option than creating a whole RecyclerView
for this, though, right?