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

Toggle hide breaks scrolling behavior #45

Open
jt-gilkeson opened this issue Jun 21, 2016 · 7 comments
Open

Toggle hide breaks scrolling behavior #45

jt-gilkeson opened this issue Jun 21, 2016 · 7 comments
Labels
Milestone

Comments

@jt-gilkeson
Copy link
Contributor

jt-gilkeson commented Jun 21, 2016

Scroll sample app down so that bottom bar disappears, click toggle hide (bar re-appears), scroll down again - bar does not disappear. If you scroll up and then down again it fixes itself.

When you unhide the bar you should be able to scroll down and have it hide again.

Seems like the bar gets into the wrong state in BottomVerticalScrollBehavior (Appears calling hide and unhide doesn't update the current state of the behavior?)

When I look at how other behaviors are implemented (like FAB) they check the current visibility of the childview - which gets rid of the need to try to track the state of hidden vs showing and trying to keep that in sync.

Use Case: User scrolls to the bottom of the screen (bar is hidden), then does something that programatically scrolls to the top of the screen - programmatic scrolling doesn't affect coordinator layout so you call unhide to show the bottom bar (and call setexpanded() on appbarlayout). Now the user scrolls down - the appbarlayout correctly scrolls to hidden, and the bottom bar should also scroll to hidden again.

@jt-gilkeson
Copy link
Contributor Author

Created pull request to fix.

@Ashok-Varma
Copy link
Owner

Ashok-Varma commented Jun 23, 2016

i will check that and merge that this weekend

@Ashok-Varma Ashok-Varma added this to the 1.3.0 milestone Jul 3, 2016
@Ashok-Varma Ashok-Varma added the bug label Jul 3, 2016
@jt-gilkeson jt-gilkeson reopened this Jul 11, 2016
@jt-gilkeson
Copy link
Contributor Author

jt-gilkeson commented Jul 11, 2016

This is still broken in 1.3.0 - If you scroll upwards (so bar hides), toggle hide (twice - due to bug) (to show bar), then scroll upwards again, it does not hide the bar.

onNestedVerticalScrollConsumed doesn't get called in BottomVertcialScrollbarBehavior in this state.

Also, Sample App toggle hide is still broken - instead of using a variable (that gets out of sync) it should BottomNavBar.isHidden() to determine whether to hide or show when you toggle.

@Ashok-Varma
Copy link
Owner

Ashok-Varma commented Jul 12, 2016

@jt-gilkeson This is only broken in Sample app because sample app was not updated. i need to update it. But the library bug was fixed

@jt-gilkeson
Copy link
Contributor Author

jt-gilkeson commented Jul 12, 2016

The library is NOT fixed.

Sorry in my steps I said scroll down - but what I meant is scroll up (slide the text upwards - the action to hide the bottom bar).

Our app calls show() and then the bar does not hide when scrolling upwards. If you follow the steps I provided you will see that the scrolling behavior is not working correctly after calling show.

Again to test - scroll up (in any app), call show(), then scroll up again - the bar does not hide like it should. I believe the other unrelated changes that were made to the nestedscroll handling broke this. As I mentioned, once the bar has been shown using show(), the onNestedVerticalScrollConsumed (or more importantly handleDirection() stops being called when scrolling up.

@Ashok-Varma
Copy link
Owner

@jt-gilkeson thanks i checked it now. i will push a fix mostly today/ this weekend.

@Ashok-Varma Ashok-Varma modified the milestones: 1.3.1, 1.3.0 Jul 12, 2016
@Ashok-Varma Ashok-Varma modified the milestones: 2.1.0, 1.3.0, 2.0.1 Jun 25, 2017
@MajaPamukovic
Copy link

Hi, this issue is still present in library versions 2.0.5 and 2.1.0. Any chance this will be fixed in the near future?

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