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. python - 獲取到的數據生成新的mysql表2. javascript - js 對中文進行MD5加密和python結果不一樣。3. mysql里的大表用mycat做水平拆分,是不是要先手動分好,再配置mycat4. window下mysql中文亂碼怎么解決??5. sass - gem install compass 使用淘寶 Ruby 安裝失敗,出現 4046. python - (初學者)代碼運行不起來,求指導,謝謝!7. 為啥不用HBuilder?8. python - flask sqlalchemy signals 無法觸發9. python的文件讀寫問題?10. 為什么python中實例檢查推薦使用isinstance而不是type?
