CoordinatorLayout的layout_scrollFlags
来源:互联网 发布:手机淘宝撤销投诉 编辑:程序博客网 时间:2024/06/03 23:28
一共有五种属性scroll,enterAlways,enterAlwaysCollapsed,snap,exitUntilCollapsed
scoll是基础,其他属性必须配合它使用
<android.support.design.widget.CollapsingToolbarLayout android:id="@+id/toolbar_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" app:contentScrim="?attr/colorPrimary" app:layout_scrollFlags="scroll|exitUntilCollapsed"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" app:layout_collapseMode="pin" app:popupTheme="@style/AppTheme.PopupOverlay" /></android.support.design.widget.CollapsingToolbarLayout>
简单的例子就是,下拉到头Toolbar才出现
app:layout_scrollFlags="scroll"
--------------------------------------------------------------------------------------------
优先滚动 Toolbar,简单的例子就是,只要一下拉,Toolbar就出现app:layout_scrollFlags="scroll|enterAlways"--------------------------------------------------------------------------------------------简单的例子就是,只要一下拉,Toolbar就出现,但是只出现Toolbar部分,下拉到头之后继续出现全部app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed"当没有CollapsingToolbarLayout包裹Toolbar时,直接给Toolbar设置 app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed"给Toolbar设置android:layout_height="200dp"android:minHeight="100dp"只要一下拉,就出现你所设置的minHeight高度,下拉到头之后出现全部可以看出CollapsingToolbarLayout包裹后,最小高度已经有了默认值-------------------------------------------------------------------------------------------简单的例子就是,只要上滑,Toolbar就跟随上滑,但是只至最小高度app:layout_scrollFlags="scroll|exitUntilCollapsed"放到被CollapsingToolbarLayout包裹的Toolbar布局中,效果就是上滑是Toolbar一直显示-------------------------------------------------------------------------------------app:layout_scrollFlags="scroll|snap"一种吸附效果,简单的说就是要不然全部弹出,要不然全部消失
app:layout_scrollFlags="scroll"
阅读全文
0 0
- CoordinatorLayout的layout_scrollFlags
- CoordinatorLayout(嵌套AppBarLayout)的app:layout_scrollFlags属性的几种设置
- NestedScrollView与behavior、layout_scrollFlags之间的关系
- 尴尬的app:layout_scrollFlags="scroll|enterAlways" 配合NavigationDrawer
- app:layout_scrollFlags
- CoordinatorLayout、SwipeRefreshLayout的使用
- CoordinatorLayout的使用
- CoordinatorLayout的简单使用
- CoordinatorLayout的详细介绍
- CoordinatorLayout的使用
- CoordinatorLayout的使用
- CoordinatorLayout 的滑动处理
- CoordinatorLayout+AppBarLayout的使用
- CoordinatorLayout的使用
- CoordinatorLayout的使用
- CoordinatorLayout的简单应用
- CoordinatorLayout的简单使用
- CoordinatorLayout的使用
- position属性值(面试必考)
- 努力的回报1
- 手游服务端框架之使用事件驱动模型解决业务高耦合
- 2017.08.14总结
- 【黑科技】用树状数组解决区间修改查询问题
- CoordinatorLayout的layout_scrollFlags
- 前几天整理的Python小程序
- JS修改昵称
- 【CUGBACM15级BC第20场 A】hdu 5123 who is the best?
- ssh框架搭建出错
- Makefile :=和=区别
- 知识储备:02数组与字符串:判断元素出现与否及次数
- 用户分页多条件查询
- POJ2001 字典树