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

Add a public API for BottomAppBar in order to show/hide it programmatically #188

Closed
brainail opened this Issue Aug 27, 2018 · 6 comments

Comments

Projects
None yet
5 participants
@brainail

brainail commented Aug 27, 2018

Could you please add some simple public API for BottomAppBar in order to show/hide it programmatically.

For now, I've created the following workaround but I think it will be more logical to have it officially 👨‍💼

Thanks!

@brainail brainail changed the title from Add public API for BottomAppBar in order to show/hide it programmatically to Add a public API for BottomAppBar in order to show/hide it programmatically Aug 27, 2018

@firatkarababa

This comment has been minimized.

Show comment
Hide comment
@firatkarababa

firatkarababa Aug 28, 2018

I am just curious, why do you need to show or hide BottomAppBar programmatically since show/hide on scroll already works when you set app:hideOnScroll="true" attribute in xml?

firatkarababa commented Aug 28, 2018

I am just curious, why do you need to show or hide BottomAppBar programmatically since show/hide on scroll already works when you set app:hideOnScroll="true" attribute in xml?

@brainail

This comment has been minimized.

Show comment
Hide comment
@brainail

brainail Aug 28, 2018

hideOnScroll works well of course. But in my case, I want to show controls again when a user is about to start searching and it's not related to scrolling at all so that's why I need it. Also, I can imagine a case with some immersive-kinda manual mode when you want to show/hide all distracting details.

In a case of AppBarLayout, I am able to use its layout params and modify ScrollFlags in order to achieve such result.

brainail commented Aug 28, 2018

hideOnScroll works well of course. But in my case, I want to show controls again when a user is about to start searching and it's not related to scrolling at all so that's why I need it. Also, I can imagine a case with some immersive-kinda manual mode when you want to show/hide all distracting details.

In a case of AppBarLayout, I am able to use its layout params and modify ScrollFlags in order to achieve such result.

@firatkarababa

This comment has been minimized.

Show comment
Hide comment
@firatkarababa

firatkarababa Aug 28, 2018

Oh, I see it, you are right. It should be nice to have such an API.

firatkarababa commented Aug 28, 2018

Oh, I see it, you are right. It should be nice to have such an API.

@ymarian

This comment has been minimized.

Show comment
Hide comment
@ymarian

ymarian Aug 31, 2018

Contributor

This was added in
43bdfac
Thanks!

Contributor

ymarian commented Aug 31, 2018

This was added in
43bdfac
Thanks!

@ymarian ymarian closed this Aug 31, 2018

@ftibi93

This comment has been minimized.

Show comment
Hide comment
@ftibi93

ftibi93 Sep 26, 2018

Are these changes available?
I am using com.google.android.material:material:1.0.0 but the mentioned methods' visibility are still protected both in BottomAppBar and HideBottomViewOnScrollBehavior classes.

ftibi93 commented Sep 26, 2018

Are these changes available?
I am using com.google.android.material:material:1.0.0 but the mentioned methods' visibility are still protected both in BottomAppBar and HideBottomViewOnScrollBehavior classes.

@dsn5ft

This comment has been minimized.

Show comment
Hide comment
@dsn5ft

dsn5ft Oct 1, 2018

Contributor

That change will be available in the next release.

Contributor

dsn5ft commented Oct 1, 2018

That change will be available in the next release.

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