android - How to scroll recyclerview based on another one -


i have 2 recycleview in same layout , same swiperefresher 1 normal result , vip it's worked well, vip recycle come above result recycle , that's give me wired result.

the screen show vip while scrolling in normal result.

how can make 2 recycle 1 scroll behavior?

my layout :-

 <android.support.v4.widget.swiperefreshlayout     android:layout_width="match_parent"     android:layout_height="match_parent"     android:id="@+id/swiperefreshlayout"     >     <linearlayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:orientation="vertical">     <android.support.v7.widget.recyclerview         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:id="@+id/viprecycleview"/>     <android.support.v7.widget.recyclerview         android:layout_width="match_parent"         android:layout_height="match_parent"         android:id="@+id/resultrecycleview"         >      </android.support.v7.widget.recyclerview>     </linearlayout>  </android.support.v4.widget.swiperefreshlayout> 

the following image demonstrate current statue.

enter image description here

try

recyclerview.setnestedscrollingenabled(true)

main xml

 <android.support.v4.widget.swiperefreshlayout   xmlns:android="http://schemas.android.com/apk/res/android"  android:orientation="vertical"   android:layout_width="match_parent"  android:layout_height="match_parent">   <android.support.v7.widget.recyclerview     android:layout_width="match_parent"     android:layout_height="match_parent"/>   </android.support.v4.widget.swiperefreshlayout> 

recycler item

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent">  <android.support.v7.widget.recyclerview     android:layout_width="match_parent"     android:layout_height="match_parent"/>  </linearlayout> 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -