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. docker-machine添加一個已有的docker主機問題2. docker images顯示的鏡像過多,狗眼被亮瞎了,怎么辦?3. 關docker hub上有些鏡像的tag被標記““This image has vulnerabilities””4. css - 求推薦適用于vue2的框架 像bootstrap這種類型的5. Span標簽6. SessionNotFoundException:會話ID為null。調用quit()后使用WebDriver嗎?(硒)7. angular.js使用$resource服務把數據存入mongodb的問題。8. css - 關于div自適應問題,大家看圖吧,說不清9. redis啟動有問題?10. java - Collections類里的swap函數,源碼為什么要新定義一個final的List型變量l指向傳入的list?
