在之前一篇博客中,讨论了Android list列表滑动显示隐藏toolbar(listview),实现是google plus的效果。
如果想要类似google photos的效果,更简单:
只要在ToolBar里增加一句就可以:
app:layout_scrollFlags="scroll|enterAlways|snap"
<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"