title: Adding a scrollView to make other views present on the screen
body: <p>I have a problem concerning the scrollView. 
  In my xml code I have a bunch of TextViews and under these TextViews I have a button. Because I have too many TextViews, the button does not appear on the screen. Therefore, I added a layout containing all of these TextViews and I put this layout inside a scrollView. However, it is still does not work. Do you have any idea why?</p>
  
  <p>Here is my xml code:</p>
  
  
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@color/green"
          android:orientation="vertical"&gt;
  
          &lt;TextView
              android:id="@+id/number_of_people_present"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:paddingBottom="20sp"
              android:textSize="35sp"
              android:textStyle="bold" /&gt;
  
          &lt;ScrollView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"&gt;
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:id="@+id/layout_textViews"
                  android:orientation="vertical"&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_horizontal"
                      android:text="Text1"
                      android:paddingBottom="20sp"
                      android:textSize="35sp"
                      android:textStyle="bold" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_horizontal"
                      android:text="Text2"
                      android:paddingBottom="20sp"
                      android:textSize="35sp"
                      android:textStyle="bold" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_horizontal"
                      android:text="Text3"
                      android:paddingBottom="20sp"
                      android:textSize="35sp"
                      android:textStyle="bold" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_horizontal"
                      android:text="Text4"
                      android:paddingBottom="20sp"
                      android:textSize="35sp"
                      android:textStyle="bold" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_horizontal"
                      android:text="Text5"
                      android:paddingBottom="20sp"
                      android:textSize="35sp"
                      android:textStyle="bold" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_horizontal"
                      android:text="Text6"
                      android:paddingBottom="20sp"
                      android:textSize="35sp"
                      android:textStyle="bold" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_horizontal"
                      android:text="Text7"
                      android:paddingBottom="20sp"
                      android:textSize="35sp"
                      android:textStyle="bold" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_horizontal"
                      android:text="Text8"
                      android:paddingBottom="20sp"
                      android:textSize="35sp"
                      android:textStyle="bold" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center_horizontal"
                      android:text="Text9"
                      android:paddingBottom="20sp"
                      android:textSize="35sp"
                      android:textStyle="bold" /&gt;
  
              &lt;/LinearLayout&gt;
  
          &lt;/ScrollView&gt;
  
          &lt;Button
              android:id="@+id/add_a_member"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginTop="15dp"
              android:text="Add a member" /&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;include layout="@layout/toolbar"/&gt;
  
  &lt;/RelativeLayout&gt; 
  </code></pre>
  
  <p>Here is the output where you see only the scrollable textViews but the button has disappeared:</p>
  
  <p><a href="https://i.stack.imgur.com/A9J5k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A9J5k.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/nz6mk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nz6mk.png" alt="enter image description here"></a></p>