title: How do I deactivate scrolling the parent scrollview if the nestedscrollview ends?
body: <p>I have a nestedscrollview inside a scrollview and it is working, but I do not want the behavior that if I scroll inside the nestedscrollview and I reach either the top or the bottom, that automatically the scroll keeps on going with the "parent" scrollview.
  I find that absolutely annoying.</p>
  
  <p>New App Project with basic activity and this content of content_main.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:layout_behavior="@string/appbar_scrolling_view_behavior"
          tools:showIn="@layout/activity_main"
          tools:context=".MainActivity"&gt;
      &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical"
              android:layout_margin="5dp"
              android:background="@color/colorPrimary"&gt;
  
          &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Root"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintLeft_toLeftOf="parent"
                  app:layout_constraintRight_toRightOf="parent"
                  app:layout_constraintTop_toTopOf="parent"
                  android:layout_margin="5dp"
                  android:background="@color/colorAccent"/&gt;
  
          &lt;ScrollView
                  android:id="@+id/scrollViewRoot"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:background="@android:color/holo_orange_dark"
                  android:paddingRight="40dp"&gt;
              &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:orientation="vertical"
                      android:layout_margin="5dp"
                      android:background="@color/colorPrimary"&gt;
  
                  &lt;TextView
                          android:text="Nested1"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content" android:id="@+id/textViewNested1"
                          android:layout_margin="5dp"
                          android:background="@color/colorAccent"/&gt;
                  &lt;androidx.core.widget.NestedScrollView
                          android:layout_width="match_parent"
                          android:layout_height="1000dp" android:fillViewport="true"
                          android:background="@android:color/black"&gt;
                      &lt;LinearLayout android:layout_width="match_parent"
                                    android:layout_height="2000dp"
                                    android:orientation="vertical"
                                    android:layout_margin="5dp"
                                    android:background="@color/colorPrimaryDark"&gt;
                          &lt;TextView
                                  android:text="TextView"
                                  android:layout_width="match_parent"
                                  android:layout_height="1800dp" android:id="@+id/textView3"
                                  android:layout_margin="5dp"
                                  android:background="@color/colorAccent"
                          /&gt;
                      &lt;/LinearLayout&gt;
                  &lt;/androidx.core.widget.NestedScrollView&gt;
                  &lt;TextView
                          android:text="Nested2"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content" android:id="@+id/textViewNested2"
                          android:layout_margin="5dp"
                          android:background="@color/colorAccent"
                  /&gt;
                  &lt;androidx.core.widget.NestedScrollView
                          android:layout_width="match_parent"
                          android:layout_height="1000dp" android:fillViewport="true"
  
                          android:background="@android:color/black"&gt;
                      &lt;LinearLayout android:layout_width="match_parent"
                                    android:layout_height="2000dp"
                                    android:orientation="vertical"
                                    android:layout_margin="5dp"
                                    android:background="@color/colorPrimaryDark"&gt;
                          &lt;TextView
                                  android:text="TextView"
                                  android:layout_width="match_parent"
                                  android:layout_height="1800dp" android:id="@+id/textView4"
                                  android:layout_margin="5dp"
                                  android:background="@color/colorAccent"
                          /&gt;
                      &lt;/LinearLayout&gt;
                  &lt;/androidx.core.widget.NestedScrollView&gt;
  
              &lt;/LinearLayout&gt;
  
          &lt;/ScrollView&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  
  <p>WRONG: scrolling inside nested can scroll the parent scrollview if top or bottom is reached.</p>
  
  <p>RIGHT: scrolling inside nested can NOT scroll the parent scrollview even if top or bottom is reached</p>