Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix scrollY when the GridView has vertical spacing#249

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jaredrummler wants to merge1 commit intoksoichiro:master
base:master
Choose a base branch
Loading
fromjaredrummler:master

Conversation

@jaredrummler
Copy link

@jaredrummlerjaredrummler commentedJun 14, 2016
edited
Loading

The scrollY is off when items have vertical spacing. This fixes the scrollY jumping to incorrect values while scrolling.

This will still be an issue on pre-JB. If you did want to fix this problem for API 11-16, you could use reflection to get the vertical spacing. Example:

privateIntegermVerticalSpacing;@OverridepublicintgetVerticalSpacing() {if (VERSION.SDK_INT >=VERSION_CODES.JELLY_BEAN) {returnsuper.getVerticalSpacing();  }if (mVerticalSpacing ==null) {try {Fieldfield =GridView.class.getDeclaredField("mVerticalSpacing");if (!field.isAccessible()) {field.setAccessible(true);      }mVerticalSpacing =field.getInt(this);    }catch (Exceptione) {mVerticalSpacing =0;    }  }returnmVerticalSpacing;}

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 93.384% when pulling3abb050 on jaredrummler:master into47a5fb2 on ksoichiro:master.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@jaredrummler@coveralls

[8]ページ先頭

©2009-2025 Movatter.jp