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. javascript - node.js promise沒用2. golang - 用IDE看docker源碼時的小問題3. yii2中restful配置好后在nginx下報404錯誤4. 算法 - python 給定一個正整數a和一個包含任意個正整數的 列表 b,求所有<=a 的加法組合5. android 如何實現如圖中的鍵盤上的公式及edittext的內容展示呢6. java - 我在用Struts2上傳文件時,報以下錯誤怎么回事?7. c++ - 如何正確的使用QWebEngineView?8. PHP注冊功能9. mysql - 求SQL語句10. MySQL如何實現表中再嵌套一個表?
