您的位置:首頁技術文章
文章詳情頁

android - coordinatorLayout嵌套recyclerview

瀏覽:195日期:2024-08-27 11:21:42

問題描述

<?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的位置 大神們這是什么問題

android - coordinatorLayout嵌套recyclerview

問題解答

回答1:

我都改成用一個reclerview就沒有這個問題了

回答2:

樓主暴力膜蛤不可取

相關文章:
国产综合久久一区二区三区