I can't see to find a way to prevent the lowest LinearLayout from being cut off within the Scroll View. I have tried adding weightsum and ensuring the Notes section (@+id/etNotes)stretches and fills the screen depending on the height of the device, however, it appears to be cutting off (@+id/bPhot) and (@+id/bHelp) How can we ensure all elements are shown even on small screens?
Any help is greatly appreciated. Thank you
<ScrollView
android:id="@+id/svMain"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent"
android:gravity="center_vertical">
<TextView
android:id="@+id/tvDetails"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/yellow"
android:clickable="true"
android:padding="10dp"
android:text="TextView"
android:textSize="@dimen/seventeen" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="10dp"
android:orientation="vertical" >
</LinearLayout>
<RadioGroup
android:id="@+id/rgStatus"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginLeft="@dimen/activity_horizontal_margin" >
<RadioButton
android:id="@+id/radio0"
android:layout_width="match_parent"
android:layout_height="46dp"
android:checked="false"
android:text="Option1"
android:textSize="@dimen/twentysize" />
<RadioButton
android:id="@+id/radio1"
android:layout_width="match_parent"
android:layout_height="48dp"
android:text="Option2"
android:textSize="@dimen/twentysize" />
<RadioButton
android:id="@+id/radio2"
android:layout_width="match_parent"
android:layout_height="46dp"
android:checked="true"
android:text="Option3"
android:textSize="@dimen/twentysize" />
</RadioGroup>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="10dp"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@color/whitewhite"
android:weightSum="5"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="0.5"
android:background="@color/whitewhite"
android:padding="10dp" >
<EditText
android:id="@+id/etNotes"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/whitewhite"
android:ems="10"
android:gravity="top"
android:hint="Notes (optional)"
android:inputType="textMultiLine"
android:padding="5dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="2"
android:background="@color/whitewhite"
android:gravity="bottom"
android:orientation="horizontal"
android:padding="8dp" >
<Button
android:id="@+id/bPhoto"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_weight=".02"
android:background="@drawable/camera"
android:gravity="left|center_vertical"/>
<Button
android:id="@+id/bHelp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2.5"
android:background="@null"
android:gravity="right|center_vertical"
android:paddingRight="@dimen/sevendp"
android:text="Check List"
android:textColor="@color/holobluelight"
android:textSize="@dimen/sixteen" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
Here is your complete layout revisited: This portion has been changed:
OLD:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@color/whitewhite"
android:weightSum="5"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="0.5"
android:background="@color/whitewhite"
android:padding="10dp" >
<EditText
android:id="@+id/etNotes"
NEW
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@color/whitewhite"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/whitewhite"
android:padding="10dp" >
<EditText
android:id="@+id/etNotes"
COMPLETE
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/svMain"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent"
android:gravity="center_vertical">
<TextView
android:id="@+id/tvDetails"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/yellow"
android:clickable="true"
android:padding="10dp"
android:text="TextView"
android:textSize="@dimen/seventeen" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="10dp"
android:orientation="vertical" >
</LinearLayout>
<RadioGroup
android:id="@+id/rgStatus"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginLeft="@dimen/activity_horizontal_margin" >
<RadioButton
android:id="@+id/radio0"
android:layout_width="match_parent"
android:layout_height="46dp"
android:checked="false"
android:text="Option1"
android:textSize="@dimen/twentysize" />
<RadioButton
android:id="@+id/radio1"
android:layout_width="match_parent"
android:layout_height="48dp"
android:text="Option2"
android:textSize="@dimen/twentysize" />
<RadioButton
android:id="@+id/radio2"
android:layout_width="match_parent"
android:layout_height="46dp"
android:checked="true"
android:text="Option3"
android:textSize="@dimen/twentysize" />
</RadioGroup>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="10dp"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@color/whitewhite"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/whitewhite"
android:padding="10dp" >
<EditText
android:id="@+id/etNotes"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/whitewhite"
android:ems="10"
android:gravity="top"
android:hint="Notes (optional)"
android:inputType="textMultiLine"
android:padding="5dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/whitewhite"
android:gravity="bottom"
android:orientation="horizontal"
android:padding="8dp" >
<Button
android:id="@+id/bPhoto"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_weight=".02"
android:background="@drawable/camera"
android:gravity="left|center_vertical"/>
<Button
android:id="@+id/bHelp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2.5"
android:background="@null"
android:gravity="right|center_vertical"
android:paddingRight="@dimen/sevendp"
android:text="Check List"
android:textColor="@color/holobluelight"
android:textSize="@dimen/sixteen" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>