title: Scroll View-Pager and Recycler-View android
body: <p>I'm creating a new layout that has view pager with recycler view and I want both scrollable at the same moment. Whether I set scroll view to scroll both, suggest me, this is my code suggest me what can I add for my goal.</p>
  
  <p>Like the amazon slider:</p>
  
  <pre><code>&lt;ScrollView 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:fillViewport="true"&gt;
  
          &lt;android.support.constraint.ConstraintLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"&gt;
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:orientation="vertical"
                  android:weightSum="2"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintEnd_toEndOf="parent"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toTopOf="parent"&gt;
  
              &lt;android.support.v7.widget.CardView
                  android:id="@+id/cardView"
                  android:layout_width="match_parent"
                  android:layout_height="0dp"
                  android:layout_margin="3dp"
                  android:layout_weight=".8"
                  app:cardBackgroundColor="#BEBEBE"
                  app:cardCornerRadius="9dp"
                  app:layout_constraintEnd_toStartOf="@+id/db_btns"
                  app:layout_constraintStart_toEndOf="@+id/db_btns"
                  app:layout_constraintTop_toTopOf="parent"&gt;
  
                      &lt;android.support.v4.view.ViewPager
                          android:id="@+id/slider"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:layout_margin="3dp"/&gt;
  
              &lt;/android.support.v7.widget.CardView&gt;
  
              &lt;android.support.v7.widget.RecyclerView
                  android:id="@+id/db_btns"
                  android:layout_width="match_parent"
                  android:layout_height="0dp"
                  android:layout_weight="1.2"/&gt;
  
              &lt;/LinearLayout&gt;
          &lt;/android.support.constraint.ConstraintLayout&gt;
      &lt;/ScrollView&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/AQ5mN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AQ5mN.png" alt="Sample Picture"></a></p>