android - coordinatorLayout嵌套recyclerview
问题描述
<?xml version='1.0' encoding='utf-8'?>
<RelativeLayout
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:background='@color/bg_grey'android:clickable='true'><android.support.design.widget.CoordinatorLayout android:layout_width='match_parent' android:layout_height='match_parent'> <android.support.design.widget.AppBarLayoutandroid:background='@null'android: android:layout_width='match_parent'android:layout_height='wrap_content' ><RelativeLayout app:contentScrim='#30469b' app:expandedTitleMarginStart='0dp' app:layout_scrollFlags='scroll|exitUntilCollapsed|snap' android:layout_width='match_parent' android:layout_height='wrap_content' android:layout_weight='1'> <TextViewandroid: android:layout_width='wrap_content'android:layout_height='wrap_content'android:layout_centerHorizontal='true'android:layout_gravity='center'android:layout_marginBottom='8dp'android:layout_marginTop='10dp'android:text='室内门禁终端'android:textColor='#2196F3' /> <LinearLayoutandroid: android:layout_width='match_parent'android:layout_height='wrap_content'android:layout_below='@+id/text1'android:layout_marginBottom='8dp'android:layout_marginRight='13dp'android:layout_marginTop='2dp'android:orientation='vertical'/> <TextViewandroid: android:layout_width='wrap_content'android:layout_height='wrap_content'android:layout_below='@+id/family_list'android:layout_centerHorizontal='true'android:layout_gravity='center_horizontal'android:layout_marginBottom='8dp'android:layout_marginTop='10dp'android:text='联系人'android:textColor='#2196F3' /></RelativeLayout> </android.support.design.widget.AppBarLayout> <android.support.v7.widget.RecyclerViewandroid: android:layout_width='match_parent'android:layout_height='wrap_content'android:layout_marginRight='13dp'app:layout_behavior='@string/appbar_scrolling_view_behavior'/></android.support.design.widget.CoordinatorLayout><com.jingxi.smartlife.user.widget.ZSideBar android: android:layout_width='15dp' android:layout_height='match_parent' android:layout_alignParentEnd='true' android:layout_gravity='right' android:layout_marginRight='3dp'/></RelativeLayout>这是我的布局现在问题是ZSideBar是一个自定义字母控件 这是个联系人列表现在的问题是点击ZSideBar的时候没有滚动正确 比如我点击的是Z但是没有滚动到Z的位置 大神们这是什么问题
问题解答
回答1:我都改成用一个reclerview就没有这个问题了
回答2:楼主暴力膜蛤不可取
相关文章:
1. html5 - 如何实现带阴影的不规则容器?2. javascript - 循环嵌套多个promise应该如何实现?3. mysql优化 - 关于mysql分区4. css - 移动端字体设置问题5. objective-c - iOS开发支付宝和微信支付完成为什么跳转到了之前开发的一个app?6. css3 - rem布局下,用户浏览器的最小字号是12px怎么办?7. vue.js - vue 打包后 nginx 服务端API请求跨域问题无法解决。8. 请教各位大佬,浏览器点 提交实例为什么没有反应9. 前端 - IE9 css兼容问题10. javascript - ionic2 input autofocus 电脑成功,iOS手机键盘不弹出
