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

Size problem with wrap_content #3

Open
LordXamon opened this issue May 2, 2017 · 1 comment
Open

Size problem with wrap_content #3

LordXamon opened this issue May 2, 2017 · 1 comment

Comments

@LordXamon
Copy link

The size of the grid view is not automatically resized, so it does not expand when configured for wrap_content
bad
Fortunately, I have no more things after the grid view, so I could solve it with the following code, but it is not the most optimal solution.

ViewGroup.LayoutParams lp = gridViewHorario.getLayoutParams();
lp.height = ViewGroup.LayoutParams.MATCH_PARENT;//YOLO
gridViewHorario.setLayoutParams(lp);

good

Otherwise, no problem. Works correctly.

@JJdeGroot
Copy link
Owner

Hi, never saw this issue until now. Looks like you have applied a 'good enough' fix.

Google has also released the StaggeredGridLayoutManager a while ago. There won't be any overlap, but your grid will be staggered which is something that you probably don't want.

I think it's time to look critically at the AutoGridView code and perhaps make it available through Gradle.

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

No branches or pull requests

2 participants