CoordinatorLayout +AppBarLayout(续)
来源:互联网 发布:阿里云服务器ftp在哪 编辑:程序博客网 时间:2024/06/08 20:34
CollapsingToolbarLayout 提供以下属性和方法使用:
- Collapsing title:ToolBar的标题,当CollapsingToolbarLayout全屏没有折叠时,title显示的是大字体,在折叠的过程中,title不断变小到一定大小的效果。可以调用setTitle(CharSequence)方法设置title。
- Content scrim:ToolBar被折叠到顶部固定时候的背景,可以调用setContentScrim(Drawable)方法改变背景或者 在Collasping属性中使用 app:contentScrim=”?attr/colorPrimary”来改变背景。
- . CollapseMode :子视图的折叠模式,在子视图设置,有两种“pin”:固定模式,在折叠的时候最后固定在顶端;“parallax”:视差模式,在折叠的时候会有个视差折叠的效果。我们可以在布局中view使用属性app:layout_collapseMode=”parallax”来改变。
- 关联视图 layout_anchor ,
使用CollapsingToolbarLayout实现折叠效果,需要注意3点
1. AppBarLayout的高度固定
2. CollapsingToolbarLayout的子视图设置layout_collapseMode属性
3. 关联悬浮视图设置app:layout_anchor,app:layout_anchorGravity属性。
阅读全文
0 0
- CoordinatorLayout +AppBarLayout(续)
- android 界面滑动隐藏(CoordinatorLayout+AppBarLayout)
- CoordinatorLayout和AppBarLayout(android MD 三)
- Android CoordinatorLayout + AppBarLayout
- CoordinatorLayout 之 AppBarLayout
- CoordinatorLayout结合AppBarLayout
- CollapsingToolbarLayout / AppBarLayout / CoordinatorLayout / FloatingActionB
- AppBarLayout,CoordinatorLayout常用属性
- CoordinatorLayout+AppBarLayout的使用
- 初涉CoordinatorLayout,AppBarLayout,CollapsingToolbarLayout
- CoordinatorLayout,AppBarLayout, NestedScrollView
- CoordinatorLayout + AppBarLayout + ToolBar
- CoordinatorLayout + AppBarLayout+GridView
- CoordinatorLayout&AppBarLayout&CollapsingToolbarLayout组合
- AppBarLayout&CoordinatorLayout&Behavior
- Snackbar、CoordinatorLayout、CardView、AppBarLayout
- CoordinatorLayout+AppBarLayout+appbar_scrolling_view_behavior
- AppBarLayout、CoordinatorLayout、CollapsingToolbarLayout、NestedScrollView
- 损失函数为什么用平方形式(二)
- Docker总结
- 正则表达式基本语法详解
- 服务器不能复制和粘贴了
- Django 安装和配置
- CoordinatorLayout +AppBarLayout(续)
- Docker总结
- 硬盘物理结构详细说明
- Docker总结
- Django ORM
- Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeExcept
- JAVA类的生命周期和虚拟机加载过程
- 自定义表单验证,密码是否包含数字、字母、特殊字符的至少2种
- 【5G NR】RLC为什么不支持级联呢?