title: How to use RecyclerView with NestedScrollView?
body: <p>I want to make a scrolling at <code>LinearLayout</code> and disable scrolling from <code>RecyclerView</code>. I tried changing <code>LinearLayout</code> to <code>NestedScrollView</code> but it doesn't work and i don't know why.</p>
  
  <p>I've tried <a href="https://stackoverflow.com/questions/31000081/how-to-use-recyclerview-inside-nestedscrollview">this question</a> but it doesn't work well. The content in RecyclerView can be loaded dynamically from WS and it's an endless scroll. The screen was freezing when content in RecyclerView updated.</p>
  
  <p><strong>I've seen this from Twitter, how can we do this</strong> <a href="https://drive.google.com/file/d/0B2JZggeoXKKFdG1ENmZEdWFIa0k/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/0B2JZggeoXKKFdG1ENmZEdWFIa0k/view?usp=sharing</a></p>
  
  <p><strong>Example</strong><br>
  This is my simple screen of my app, i want scrolling at <code>red</code> currently, and it currently scrolls at 'blue'. Many thanks.<br><br>
  <a href="https://i.stack.imgur.com/nhMUG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nhMUG.png" alt="enter image description here"></a></p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>&lt;LinearLayout
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;ImageView
      android:layout_width="match_parent"
      android:layout_height="160dp"
      android:layout_margin="16dp"
      android:background="#CCC"
      android:id="@+id/imageView2" /&gt;
  
  &lt;TextView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:text="Image caption"
      android:background="#cbffa3"
      android:padding="16dp"
      android:id="@+id/textView8" /&gt;
  
  &lt;android.support.v7.widget.RecyclerView
      android:id="@+id/my_recycler_view"
      android:scrollbars="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>Tried but not work, contents inside RecyclerView not showing</strong></p>
  
  <pre><code>&lt;android.support.v4.widget.NestedScrollView
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;LinearLayout
          android:orientation="vertical"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
          &lt;ImageView
              android:layout_width="match_parent"
              android:layout_height="160dp"
              android:layout_margin="16dp"
              android:background="#CCC"
              android:id="@+id/imageView2" /&gt;
  
          &lt;TextView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:text="Image caption"
              android:background="#cbffa3"
              android:padding="16dp"
              android:id="@+id/textView8" /&gt;
  
          &lt;android.support.v7.widget.RecyclerView
              android:id="@+id/my_recycler_view"
              android:scrollbars="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent"/&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/android.support.v4.widget.NestedScrollView&gt;
  </code></pre>