RecyclerView 盖住 AppBarLayout 问题解决
来源:互联网 发布:阿里云免费ssl 编辑:程序博客网 时间:2024/06/07 00:28
初学Android,前几天学到Material Design,非常喜欢这个UI。迫不及待就用MD设计尝试写了个App。
然后在开发过程中遇到了些问题。
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:id="@+id/appBar" android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.Toolbar android:id="@+id/toobar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/> <!--其他控件--> </android.support.design.widget.AppBarLayout> <!--其他控件--> <android.support.v7.widget.RecyclerView android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="30dp"/></android.support.design.widget.CoordinatorLayout>
一开始敲上述代码运行时发现RecyclerView盖住了AppBarLayout的除了Toolbar的其他控件。
查书后解决,应给RecyclerView指定一个布局行为,在其tag中添加下述代码。 app:layout_behavior="@string/appbar_scrolling_view_behavior"
即可解决。
阅读全文
0 0
- RecyclerView 盖住 AppBarLayout 问题解决
- 关于tableviewHeader盖住cell的问题解决
- Android AppBarLayout+TabLayout+RecyclerView+ViewPager+Fragment
- recyclerview,AppBarLayout,Toolbar,CoordinatorLayout 的结合使用~
- AppBarLayout
- AppBarLayout
- AppBarLayout
- 如何让DIV层盖住下拉列表框? 问题解决方案
- RecyclerView与CoordinatorLayout,AppBarLayout,CollapsingToolbarLayout 解决上滑到toolbar卡顿
- CoordinatorLayout,AppBarLayout,CollapsingToolbarLayout,Toolbar,NestedScrollView,RecyclerView结合使用
- CollapsingToolbarLayout配合CoordinatorLayout、AppBarLayout,RecyclerView实现伸缩布局
- AppBarLayout+TabLayout+RecyclerView实现滑动隐藏导航栏。
- CoordinatorLayout + AppBarLayout + NestScrollView 向上滑动卡顿问题解决方案
- RecyclerView+CheckBox乱序问题解决
- 一个常被问道的问题:如何让层盖住下拉列表框? 问题解决方案.(转)
- CoordinatorLayout、Toolbar、TabLayout、AppBarLayout和RecyclerView组合可以滑动收起或显示Toolbar的demo
- Android新特性之CoordinatorLayout+AppBarLayout+RecyclerView实现下拉隐藏ToolBar
- CoordinatorLayout+AppBarLayout+RecyclerView+ViewPager打造可上下左右滑动的App主框架
- 数组的定义,初始化和使用
- PHP微信开发ReplyModel(封装服务器验证,消息获取,返回消息)
- JS+CSS简单实现DIV遮罩层显示隐藏
- 要解析的Json文件
- 听说你会求逆序对??(自创的脑洞题)
- RecyclerView 盖住 AppBarLayout 问题解决
- rocketmq注意点
- 财务人员给员工发工资时经常遇到这样一个问题, 即根据每个人的工资额(以元作为单位)计算出各种面值的钞票的张数,且要求总张数最少。 例如,某职工工资为3436元,发放方案为: 100元34张,20元1张
- shell学习五----变量子串
- Mabatis typeHandler的使用
- 四、 基础教程-图表主要组成
- char* 与 char[] 的区别
- 网易2017春招笔试真题编程题集合--工作安排
- 我的算法模板