踩坑记录:

RecyclerView的父容器为FrameLayout,FrameLayout相关属性如下:

        android:layout_width="@dimen/dimen_358px"
        android:layout_height="match_parent"
        android:background="@drawable/sidebar_classic"

RecyclerView要求显示滚动条,相关属性如下

            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/dimen_80px"
            android:fadeScrollbars="false"
            android:scrollbarSize="3px"
            android:overScrollMode="never"
            android:scrollbarThumbVertical="@drawable/shape_scrollbar_ver"
            android:scrollbars="vertical"

运行项目到机器上面,RecyclerView的滚动条无法显示(然后csdn查,百度查等等查都没找到相关的内容/*可能是关键字不对*/,于是。。。)

思考:控件属性正常,RecyclerView内的item可以点击操作,不存在被其他透明View遮盖的情况;

解决流程:给RecyclerView添加背景色,查看实际的控件显示范围(水平低,还不自信,总对自己写的属性没信心,相信眼见为实),添加背景色后,运行到机器上,我靠,滚动条出来了,所以滚动条不显示跟背景有关系(WTF),因为项目问题,不能直接将FramenLayout的背景直接调整到RecyclerView中,于是在RecyclerView的属性中添加:android:background="@color/transparent",运行验证,完美~

工作踩坑记录 随缘记录 Ⅰ

更多相关文章

  1. android xml控件属性
  2. EditText 所有属性
  3. Edittext设置输入属性,包括使用代码设置
  4. Android 之 EditText属性用法介绍
  5. Android 5.0 默认水波纹背景属性,可设置任何View
  6. RelativeLayout用到的一些重要的属性(自己在网上找的)
  7. android TextView属性汇总

随机推荐

  1. android监听ScrollView滑动停止
  2. Android(安卓)Studio/Gradle/重复依赖
  3. Android(安卓)studio 点击按钮 改变viewt
  4. android获取控件的几种方法
  5. Android(安卓)PopupWindow做的分享界面
  6. android 一些路径的标准写法
  7. android之ArrayAdaper之Spinner
  8. android之访问被保护的资源
  9. android之检测手机电池
  10. Android仿iPhone的日期时间选择器