title: Android Studio - Not all nested layouts inside ScrollView's child are showing
body: <p>I need your help!
  I have an activity which supposed to be scrollable,
  Therefore the ScrollView is the top layout(i hope this is how you call it).</p>
  
  <ul>
  <li>I used android:fillViewport="true" on the ScrollView
  -The ScrollView's child is a LinearLayout with a couple of more nested LinearLayouts.</li>
  </ul>
  
  <p>Now <em>my problem is</em> that on the preview screen(Design) i see my layout fine
  but when i run the app on an Emulator,i only see half of my layout (until the first nested LinearLayout) and as a collateral damage, the scrollview isn't scrollable.</p>
  
  <p>Thanks in advance for the help!</p>
  
  <p>Design Screen Image:
  <strong>[At the preview screen it looks good]</strong></p>
  
  <p><img src="https://i.stack.imgur.com/xcdpX.png"></p>
  
  <p>Emulator Screen Image:
  <strong>[As you can see ,only half of the scrollview's content is showing ]</strong></p>
  
  <p><img src="https://i.stack.imgur.com/yoKKY.png"></p>
  
  <p><strong>Updated</strong> layout file:(still showing only half of the layout at runtime)<br>
  Added:<br>
  - tools:context=<br>
  - ScrollView changed from layout_height="wrap_content" to 
     layout_height="match_parent"  </p>
  
  <ul>
  <li><p>Removed all instances of weight="1" from all nested LinearLayouts.<br>
  AddParkingActivity.xml:</p>
  
  <p>xml version="1.0" encoding="utf-8"  </p>
  
  <pre><code>    &lt;ScrollView  
      xmlns:tools="http://schemas.android.com/tools"  
      android:layout_width="match_parent"  
      android:layout_height="match_parent"  
      android:layout_weight="1"  
      android:background="#FFA3D2E9"  
      android:clickable="true"  
      android:clipToPadding="false"  
      android:fillViewport="true"  
      android:focusable="true"  
      android:layoutDirection="rtl"&gt;  
  
  
         &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layoutDirection="rtl"
          android:orientation="vertical"
          android:textDirection="rtl"&gt;
  
  
          &lt;TextView
              android:id="@+id/addParkingActivity_tv_title"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:layout_margin="20dp"
              android:layout_marginBottom="16dp"
              android:layout_marginTop="23dp"
              android:fontFamily="cursive"
              android:text="הוספת חנייה חדשה למסד הנתונים"
              android:textAlignment="center"
              android:textColor="@android:color/white"
              android:textSize="24sp"
              android:textStyle="bold"
              android:typeface="monospace" /&gt;
  
          &lt;EditText
  
              android:id="@+id/addParkingActivity_Name"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginBottom="8dp"
              android:ems="10"
              android:hint="שם החניון"
              android:inputType="textPersonName"
              android:paddingHorizontal="16dp"
              android:textColor="#ffff"
              android:textDirection="rtl"
              android:textSize="18sp" /&gt;
  
          &lt;EditText
  
              android:id="@+id/addParkingActivity_area"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginBottom="8dp"
              android:ems="10"
              android:hint="אזור מפורט"
              android:inputType="textPersonName"
              android:paddingHorizontal="16dp"
              android:textColor="#ffff"
              android:textDirection="rtl"
              android:textSize="18sp" /&gt;
  
          &lt;Spinner
              android:id="@+id/addParkingActivity_subAreaSpinner"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginBottom="16dp"
              android:paddingHorizontal="16dp"
              android:textColor="#ffff"
              android:textDirection="rtl"
              android:textSize="18sp" /&gt;
  
          &lt;View
              android:layout_width="match_parent"
              android:layout_height="2dip"
              android:background="#FF909090" /&gt;
  
          &lt;LinearLayout
              android:id="@+id/ll_radioG1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:layout_marginBottom="16dp"
              android:background="#FFA3D2E9"
              android:gravity="center_horizontal"
              android:layoutDirection="rtl"
              android:orientation="horizontal"
              android:textDirection="rtl"&gt;
  
  
              &lt;RadioButton
                  android:id="@+id/addParkingActivity_crewAcc_radio"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingLeft="@dimen/radioLeft"
                  android:text="לינה לצוות"
                  android:textColor="#000"
                  android:textDirection="rtl" /&gt;
  
              &lt;RadioButton
                  android:id="@+id/addParkingActivity_water_radio"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingLeft="6dp"
                  android:text="מים"
                  android:textColor="#000"
                  android:textDirection="rtl" /&gt;
  
              &lt;RadioButton
                  android:id="@+id/addParkingActivity_showers_radio"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingLeft="6dp"
                  android:text="מקלחות"
                  android:textColor="#000"
                  android:textDirection="rtl" /&gt;
  
              &lt;RadioButton
                  android:id="@+id/addParkingActivity_accessibility_radio"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingLeft="6dp"
                  android:text="נגישות"
                  android:textColor="#000"
                  android:textDirection="rtl" /&gt;
  
  
          &lt;/LinearLayout&gt;
  
          &lt;View
              android:layout_width="match_parent"
              android:layout_height="2dip"
              android:background="#FF909090" /&gt;
  
          &lt;LinearLayout
              android:id="@+id/ll_radioG2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:layout_marginBottom="16dp"
              android:background="#FFA3D2E9"
              android:gravity="center_horizontal"
              android:layoutDirection="rtl"
              android:orientation="horizontal"
              android:textDirection="rtl"&gt;
  
  
              &lt;RadioButton
                  android:id="@+id/addParkingActivity_fence_radio"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingBottom="4dp"
                  android:paddingLeft="@dimen/radioLeft"
                  android:text="גדר"
                  android:textColor="#000"
                  android:textDirection="rtl" /&gt;
  
              &lt;RadioButton
                  android:id="@+id/addParkingActivity_toilets_radio"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingBottom="4dp"
                  android:paddingLeft="6dp"
                  android:text="שירותים"
                  android:textColor="#000"
                  android:textDirection="rtl" /&gt;
  
              &lt;RadioButton
                  android:id="@+id/addParkingActivity_cookingPos_radio"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingBottom="4dp"
                  android:paddingLeft="6dp"
                  android:text="עמדות בישול"
                  android:textColor="#000"
                  android:textDirection="rtl" /&gt;
  
              &lt;RadioButton
                  android:id="@+id/addParkingActivity_equipmentToBor_radio"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingBottom="4dp"
                  android:paddingLeft="6dp"
                  android:text="ציוד להשאלה"
                  android:textColor="#000"
                  android:textDirection="rtl" /&gt;
  
  
          &lt;/LinearLayout&gt;
  
          &lt;View
              android:layout_width="match_parent"
              android:layout_height="2dip"
              android:background="#FF909090" /&gt;
  
          &lt;LinearLayout
              android:id="@+id/ll_radioG3"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:layout_marginBottom="16dp"
              android:background="#FFA3D2E9"
              android:gravity="center_horizontal"
              android:layoutDirection="rtl"
              android:orientation="horizontal"
              android:textDirection="rtl"&gt;
  
  
              &lt;RadioButton
                  android:id="@+id/addParkingActivity_electricity_radio"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingBottom="4dp"
                  android:paddingLeft="@dimen/radioLeft"
                  android:text="חשמל ותאורה"
                  android:textColor="#000"
                  android:textDirection="rtl" /&gt;
  
              &lt;RadioButton
                  android:id="@+id/addParkingActivity_securityServ_radio"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingBottom="4dp"
                  android:paddingLeft="6dp"
                  android:text="שירותי אבטחה"
                  android:textColor="#000"
                  android:textDirection="rtl" /&gt;
  
              &lt;RadioButton
                  android:id="@+id/addParkingActivity_medicalServ_radio"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingBottom="4dp"
                  android:paddingLeft="6dp"
                  android:text="שירותי רפואה"
                  android:textColor="#000"
                  android:textDirection="rtl" /&gt;
  
  
          &lt;/LinearLayout&gt;
  
          &lt;View
              android:layout_width="match_parent"
              android:layout_height="2dip"
              android:background="#FF909090" /&gt;
  
          &lt;LinearLayout
              android:id="@+id/ll_radioG5"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:layout_marginBottom="16dp"
              android:background="#FFA3D2E9"
              android:gravity="center_horizontal"
              android:layoutDirection="rtl"
              android:orientation="horizontal"
              android:textDirection="rtl"&gt;
  
  
              &lt;Button
                  android:id="@+id/addParkingActivity_buttonMarkAll"
                  android:layout_width="49dp"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="16dp"
                  android:background="@drawable/roundedbutton"
                  android:onClick="onMarkAllClick"
                  android:text="סמן הכל" /&gt;
  
              &lt;Button
                  android:id="@+id/addParkingActivity_buttonUNMarkAll"
                  android:layout_width="50dp"
                  android:layout_height="wrap_content"
                  android:layout_marginRight="16dp"
                  android:background="@drawable/roundedbutton"
                  android:onClick="onUNMarkAllClick"
                  android:text="אפס כפתורים" /&gt;
  
  
          &lt;/LinearLayout&gt;
  
          &lt;EditText
  
              android:id="@+id/addParkingActivity_securityOrganization"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginBottom="8dp"
              android:ems="10"
              android:hint="@string/securityOrg"
              android:paddingHorizontal="16dp"
              android:textColor="#ffff"
              android:textDirection="rtl"
              android:textSize="18sp" /&gt;
  
          &lt;EditText
  
              android:id="@+id/addParkingActivity_notes"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginBottom="8dp"
              android:ems="10"
              android:hint="הערות נוספות"
              android:paddingHorizontal="16dp"
              android:textColor="#ffff"
              android:textDirection="rtl"
              android:textSize="18sp" /&gt;
  
  
          &lt;LinearLayout
              android:id="@+id/ll_radioG6"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:layout_marginBottom="16dp"
              android:background="#FFA3D2E9"
              android:gravity="center_horizontal"
              android:layoutDirection="rtl"
              android:orientation="horizontal"
              android:textDirection="rtl"&gt;
  
  
              &lt;EditText
  
                  android:id="@+id/addParkingActivity_googleMapsY"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginBottom="8dp"
                  android:ems="10"
                  android:hint="ערך עשרוני שני \n בגוגל מפות"
                  android:inputType="number"
                  android:paddingEnd="10dp"
                  android:paddingStart="10dp"
                  android:textColor="#ffff"
                  android:textDirection="rtl"
                  android:textSize="12sp" /&gt;
  
              &lt;EditText
  
                  android:id="@+id/addParkingActivity_googleMapsX"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginBottom="8dp"
                  android:ems="10"
                  android:hint="ערך עשרוני ראשון \n בגוגל מפות"
                  android:inputType="number"
                  android:paddingEnd="10dp"
                  android:paddingStart="10dp"
                  android:textColor="#ffff"
                  android:textDirection="rtl"
  
                  android:textSize="12sp" /&gt;
  
  
          &lt;/LinearLayout&gt;
  
  
          &lt;EditText
  
              android:id="@+id/addParkingActivity_type"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginBottom="8dp"
              android:ems="10"
              android:hint="סוג חניון או בעלות"
              android:paddingHorizontal="16dp"
              android:textColor="#ffff"
              android:textDirection="rtl"
              android:textSize="18sp" /&gt;
  
  
          &lt;LinearLayout
              android:id="@+id/ll_radioG4"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal"
              android:layout_marginBottom="16dp"
              android:background="#FFA3D2E9"
              android:gravity="center_horizontal"
              android:layoutDirection="rtl"
              android:orientation="horizontal"
              android:textDirection="rtl"&gt;
  
  
              &lt;Button
                  android:id="@+id/addParkingActivity_buttonADD_PARKING"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="16dp"
                  android:background="@drawable/roundedbutton"
                  android:onClick="onAddParkingPressed"
                  android:text=" הוסף חנייה"
                  android:textAlignment="center"
                  android:textColor="@android:color/white"
                  android:textSize="16sp"
                  android:textStyle="bold" /&gt;
  
  
          &lt;/LinearLayout&gt;
  
          &lt;View
              android:layout_width="match_parent"
              android:layout_height="50dp" /&gt;
      &lt;/LinearLayout&gt;
  
  
  &lt;/ScrollView&gt;
  </code></pre></li>
  </ul>