Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Material Design checklist: hiding app bar on scroll?

Per the new Android Material Design checklist:

http://android-developers.blogspot.com/2014/10/material-design-on-android-checklist.html

Where appropriate, upon scrolling down, the app bar can scroll off the screen, leaving more vertical space for content. Upon scrolling back up, the app bar should be shown again.

I realize there are lots of questions/answers to implement this behavior for the ICS-style app bar, but I'm curious if the new Toolbar widget or Lollipop/AppCompat 21 have introduced a more standard way of achieving this effect.

like image 802
Eric Farraro Avatar asked Oct 28 '14 19:10

Eric Farraro


People also ask

What is an appbar?

The app bar, also known as the action bar, is one of the most important design elements in your app's activities, because it provides a visual structure and interactive elements that are familiar to users.

What is bottombar?

A bottom app bar displays navigation and key actions at the bottom of mobile screens.

What is the bar at the bottom of the app screen called?

The Navigation bar is the menu that appears on the bottom of your screen - it's the foundation of navigating your device. However, it isn't set in stone; you can customize the layout and button order, or even make it disappear entirely and use gestures to navigate your device instead.

What is top bar in mobile called?

1. Status Bar. In an Android phone, the status bar contains the clock, battery icon, and other notification icons as shown in the below image. Most of the time, it is at the top of the screen.


1 Answers

Per Roman Nurik on Google+ (essentially what @tyczj mentioned)

https://plus.google.com/u/0/+RomanNurik/posts/3G8zYvN5oRC

It's not built in but relatively simple to implement. Just observe scrolling and animate the Y translation. Could also use the "quick return" sample +Nick Butcher​ and I published a few years ago

I believe that example referenced is: https://code.google.com/p/romannurik-code/source/browse/misc/scrolltricks

UPDATE: I also just discovered a great library that does this, along with some other great tricks https://github.com/ksoichiro/Android-ObservableScrollView

like image 191
Eric Farraro Avatar answered Sep 25 '22 11:09

Eric Farraro