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

Wrong drag fast scroll section #93

Open
hendrawd opened this issue Jun 19, 2017 · 7 comments
Open

Wrong drag fast scroll section #93

hendrawd opened this issue Jun 19, 2017 · 7 comments
Labels

Comments

@hendrawd
Copy link

I am testing recyclerview with header with google default example project, so i am following https://github.com/turing-tech/MaterialScrollBar/wiki/Header-Tutorial

But the result of the drag scroller text when expanded is wrong

It should show "This is element #9999 - act as content" instead of "This is element #9981 - act as content"

What am i doing wrong here?
Here is my test project https://github.com/hendrawd/drag-fast-scroller-test

@marbat87
Copy link
Contributor

@hendrawd I think that the element reported in the bubble is the first visible one.

@hendrawd
Copy link
Author

"Item #9981" isn't even visible on the screen

@hendrawd
Copy link
Author

hendrawd commented Jun 19, 2017

I already tried with GridLayoutManager with 1 span count, but the problem still exist, especially if there are many items there. If the items is not many, then the bug isn't noticeable

@marbat87
Copy link
Contributor

@hendrawd There is the last word regarding "item #9981" ("content" ad the top"). isn't it?

@hendrawd
Copy link
Author

The top left content word is "item #9983"

@hendrawd
Copy link
Author

Is using int accurate for the height of IHeaderAdapter.getHeaderHeight() and IHeaderAdapter.getRowHeight()? Because i am afraid it can lead to wrong calculation. For example i have RecyclerView with GridLayoutManager. It has 3 items in a row with square items inside it, so the height of each item is screen width in pixel / 3. If i do the calculation and convert it to int, it will be rounded automatically, that will lead to higher height.

@turing-tech
Copy link
Owner

If you'd like to try using floats feel free to fork the library and try it out for yourself.

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

3 participants