Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to switch from list layout to grid layout using groupie ? #424

Open
aeroxr1 opened this issue Apr 1, 2022 · 1 comment
Open

How to switch from list layout to grid layout using groupie ? #424

aeroxr1 opened this issue Apr 1, 2022 · 1 comment
Labels

Comments

@aeroxr1
Copy link

aeroxr1 commented Apr 1, 2022

Hi ,
I have to show a list of grouped items using groupie.
The user can choose the way the items are been showed on screen: list layout or grid layout.

In the past I have done it setting dinamiically the span count of a gridviewlayout.
When the span count was 1 I returned the view type of a list element, when was > 1 I returned the view type for a grid view.
( something like this https://medium.com/xorum-io/android-recyclerview-animated-transition-between-grid-and-list-layouts-b2309e1d9f19 )
In groupie I don't know how to do that.

@aeroxr1
Copy link
Author

aeroxr1 commented Apr 13, 2022

@Zhuinden I thought to recreate the model view every time the user clicks on switch button, but it is soo expensive. I'm hoping is there a different way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant