I have a RecyclerView in one layout and in another layout the layout of the element that is added to it.
What I want to do is that in the RecyclerView only the first three elements are seen and then to see the next ones you have to scroll.
That is, if there is one item, the size of the RecyclerView is equal to the size of one item. If it contains two, let the size fit those two items. The same with three but from the three elements, you need to scroll. I have tried using LinearLayoutManager but I see all the added elements.