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

IllegalArgumentException when setting snapGravity to center #75

Closed
clhols opened this issue Aug 31, 2021 · 3 comments
Closed

IllegalArgumentException when setting snapGravity to center #75

clhols opened this issue Aug 31, 2021 · 3 comments

Comments

@clhols
Copy link

clhols commented Aug 31, 2021

With snap helper version 2.2.1

This is due to missing break; in GravitySnapRecyclerView:

Current:

            case 4:
                snapHelper = new GravitySnapHelper(Gravity.CENTER);
            default:
                throw new IllegalArgumentException....

should be

            case 4:
                snapHelper = new GravitySnapHelper(Gravity.CENTER);
                break;
            default:
                throw new IllegalArgumentException...
@clhols
Copy link
Author

clhols commented Aug 31, 2021

Reverting back to version 2.2.0 from jcenter is a workaround. Seems a regression has happened in 2.2.1.

@rubensousa
Copy link
Owner

Thanks for letting me know. I will fix this in 2.2.2 and will update here once it's released @clhols

@rubensousa
Copy link
Owner

2.2.2 released with this fix

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