android layout 嵌套,coordinatorLayout嵌套recyclerview

在Android布局中,遇到ZSideBar点击后未能正确滚动到指定字母的故障。问题在于ZSideBar控件与联系人列表的交互不匹配。需要检查ZSideBar的点击事件处理及与滚动视图的同步机制,确保点击字母时能准确滚动到相应位置。

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:layout_width="match_parent"

android:layout_height="match_parent"

>

android:background="@null"

android:id="@+id/appbar"

android:layout_width="match_parent"

android:layout_height="wrap_content"

>

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">

android:id="@+id/text1"

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"

/>

android:id="@+id/family_list"

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"/>

android:id="@+id/text2"

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"

/>

android:id="@+id/contact_ev"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_marginRight="13dp"

app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

android:id="@+id/contact_sidebar"

android:layout_width="15dp"

android:layout_height="match_parent"

android:layout_alignParentEnd="true"

android:layout_gravity="right"

android:layout_marginRight="3dp"/>

这是我的布局

现在问题是ZSideBar是一个自定义字母控件 这是个联系人列表

现在的问题是点击ZSideBar的时候没有滚动正确 比如我点击的是Z但是没有滚动到Z的位置

大神们这是什么问题

bVFe5S?w=1080&h=1920

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值