Skip to content

Tag: linearlayoutmanager

How to change RecyclerView LayoutManager from List to Grid?

I’m using a ViewPager in which I have a RecyclerView, in this RecyclerView I want to change the LayoutManager from List to Grid. I’ve implemented this code: On the RecyclerView’s onCreateViewHolder I have the following code: I make the change from List to Grid through a FloatingButton, changing the value of “managerL” (this is a boolean variable) so, when I