Material Design checklist: hiding app bar on scroll?

后端 未结 2 1696
生来不讨喜
生来不讨喜 2021-02-03 10:45

Per the new Android Material Design checklist:

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

Where appr

2条回答
  •  萌比男神i
    2021-02-03 11:29

    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

提交回复
热议问题