gpt4 book ai didi

android - Material 设计 list : hiding app bar on scroll?

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:09:05 24 4
gpt4 key购买 nike

根据新的 Android Material Design list :

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.

我知道有很多问题/答案可以为 ICS 样式的应用栏实现此行为,但我很好奇新的工具栏小部件或 Lollipop/AppCompat 21 是否引入了更标准的方法来实现此效果。

最佳答案

Google+ 上的 Per Roman Nurik(基本上是@tyczj 提到的内容)

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

我相信引用的示例是: https://code.google.com/p/romannurik-code/source/browse/misc/scrolltricks

更新:我刚刚还发现了一个很棒的库可以执行此操作,以及其他一些很棒的技巧 https://github.com/ksoichiro/Android-ObservableScrollView

关于android - Material 设计 list : hiding app bar on scroll?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26616427/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com