I am doing a checklist. But the scroll view didn't work. When I tried to export, I couldn't either.
One error it shows is right on [1]. And the picture [2] is the code on the top.
Thanks :)
1:http://imgur.com/QVEKMnf
2:http://imgur.com/6WgQjE9
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="#+id/scrollView"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Battery"
android:id="#+id/textView2"
android:textSize="25sp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox"
android:layout_alignParentTop="true"
android:layout_toLeftOf="#+id/checkBox2"
android:layout_toStartOf="#+id/checkBox2" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox2"
android:layout_marginRight="57dp"
android:layout_marginEnd="57dp"
android:layout_above="#+id/textView3"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Standby Power"
android:id="#+id/textView3"
android:textSize="25sp"
android:layout_below="#+id/checkBox"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox3"
android:layout_alignTop="#+id/textView3"
android:layout_toLeftOf="#+id/checkBox4"
android:layout_toStartOf="#+id/checkBox4" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox4"
android:layout_alignTop="#+id/checkBox3"
android:layout_toRightOf="#+id/checkBox"
android:layout_toEndOf="#+id/checkBox" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Parking Brake"
android:id="#+id/textView4"
android:textSize="25sp"
android:layout_below="#+id/checkBox3"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="test"
android:id="#+id/checkBox5"
android:layout_below="#+id/checkBox3"
android:layout_alignLeft="#+id/checkBox3"
android:layout_alignStart="#+id/checkBox3"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Fire Warning System"
android:id="#+id/textView5"
android:textSize="25sp"
android:layout_below="#+id/checkBox5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/textView3"
android:layout_alignEnd="#+id/textView3" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="test"
android:id="#+id/checkBox7"
android:layout_below="#+id/checkBox5"
android:layout_alignLeft="#+id/checkBox5"
android:layout_alignStart="#+id/checkBox5"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="EXT Test Switch"
android:id="#+id/textView6"
android:textSize="25sp"
android:layout_below="#+id/textView5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/textView5"
android:layout_alignEnd="#+id/textView5" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="test"
android:id="#+id/checkBox6"
android:layout_alignTop="#+id/textView6"
android:layout_alignLeft="#+id/checkBox7"
android:layout_alignStart="#+id/checkBox7"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Left Forward Fuel Pump"
android:id="#+id/textView7"
android:textSize="25sp"
android:layout_below="#+id/textView6"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/textView6"
android:layout_alignEnd="#+id/textView6" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox8"
android:layout_below="#+id/textView6"
android:layout_alignLeft="#+id/checkBox6"
android:layout_alignStart="#+id/checkBox6" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox9"
android:layout_alignTop="#+id/checkBox8"
android:layout_toRightOf="#+id/checkBox6"
android:layout_toEndOf="#+id/checkBox6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="APU"
android:id="#+id/textView8"
android:textSize="25sp"
android:layout_below="#+id/textView7"
android:layout_alignParentLeft="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="start"
android:id="#+id/checkBox10"
android:layout_below="#+id/textView7"
android:layout_alignLeft="#+id/checkBox8"
android:layout_alignStart="#+id/checkBox8"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="APU Generatars"
android:id="#+id/textView9"
android:textSize="25sp"
android:layout_below="#+id/checkBox10"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox12"
android:layout_below="#+id/checkBox10"
android:layout_alignLeft="#+id/checkBox10"
android:layout_alignStart="#+id/checkBox10" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox13"
android:layout_below="#+id/checkBox10"
android:layout_alignLeft="#+id/checkBox9"
android:layout_alignStart="#+id/checkBox9" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="YAW Damper"
android:id="#+id/textView10"
android:textSize="25sp"
android:layout_below="#+id/checkBox12"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox14"
android:layout_alignTop="#+id/textView10"
android:layout_alignLeft="#+id/checkBox12"
android:layout_alignStart="#+id/checkBox12" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox15"
android:layout_alignTop="#+id/checkBox14"
android:layout_alignLeft="#+id/checkBox13"
android:layout_alignStart="#+id/checkBox13" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Galley"
android:id="#+id/textView11"
android:textSize="25sp"
android:layout_below="#+id/checkBox14"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox11"
android:layout_below="#+id/checkBox14"
android:layout_alignLeft="#+id/checkBox14"
android:layout_alignStart="#+id/checkBox14" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox16"
android:layout_below="#+id/checkBox15"
android:layout_toRightOf="#+id/checkBox6"
android:layout_toEndOf="#+id/checkBox6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Emergency Exit Lights"
android:id="#+id/textView12"
android:textSize="25sp"
android:layout_below="#+id/checkBox11"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="#+id/checkBox11"
android:layout_toStartOf="#+id/checkBox11" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox17"
android:layout_alignTop="#+id/textView12"
android:layout_toRightOf="#+id/textView12"
android:layout_toEndOf="#+id/textView12" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox18"
android:layout_alignParentBottom="true"
android:layout_alignLeft="#+id/checkBox16"
android:layout_alignStart="#+id/checkBox16" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="No Smoking"
android:id="#+id/textView12"
android:textSize="25sp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox19"
android:layout_alignTop="#+id/textView12"
android:layout_toRightOf="#+id/textView12"
android:layout_toEndOf="#+id/textView12" />
</LinearLayout>
</ScrollView>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_margin="16dp"
>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="#+id/scrollView"
android:layout_gravity="center_horizontal">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Battery"
android:id="#+id/textView2"
android:textSize="25sp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox"
android:layout_alignParentTop="true"
android:layout_toLeftOf="#+id/checkBox2"
android:layout_toStartOf="#+id/checkBox2" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox2"
android:layout_marginRight="57dp"
android:layout_marginEnd="57dp"
android:layout_above="#+id/textView3"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Standby Power"
android:id="#+id/textView3"
android:textSize="25sp"
android:layout_below="#+id/checkBox"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox3"
android:layout_alignTop="#+id/textView3"
android:layout_toLeftOf="#+id/checkBox4"
android:layout_toStartOf="#+id/checkBox4" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox4"
android:layout_alignTop="#+id/checkBox3"
android:layout_toRightOf="#+id/checkBox"
android:layout_toEndOf="#+id/checkBox" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Parking Brake"
android:id="#+id/textView4"
android:textSize="25sp"
android:layout_below="#+id/checkBox3"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="test"
android:id="#+id/checkBox5"
android:layout_below="#+id/checkBox3"
android:layout_alignLeft="#+id/checkBox3"
android:layout_alignStart="#+id/checkBox3"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Fire Warning System"
android:id="#+id/textView5"
android:textSize="25sp"
android:layout_below="#+id/checkBox5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/textView3"
android:layout_alignEnd="#+id/textView3" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="test"
android:id="#+id/checkBox7"
android:layout_below="#+id/checkBox5"
android:layout_alignLeft="#+id/checkBox5"
android:layout_alignStart="#+id/checkBox5"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="EXT Test Switch"
android:id="#+id/textView6"
android:textSize="25sp"
android:layout_below="#+id/textView5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/textView5"
android:layout_alignEnd="#+id/textView5" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="test"
android:id="#+id/checkBox6"
android:layout_alignTop="#+id/textView6"
android:layout_alignLeft="#+id/checkBox7"
android:layout_alignStart="#+id/checkBox7"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Left Forward Fuel Pump"
android:id="#+id/textView7"
android:textSize="25sp"
android:layout_below="#+id/textView6"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/textView6"
android:layout_alignEnd="#+id/textView6" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox8"
android:layout_below="#+id/textView6"
android:layout_alignLeft="#+id/checkBox6"
android:layout_alignStart="#+id/checkBox6" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox9"
android:layout_alignTop="#+id/checkBox8"
android:layout_toRightOf="#+id/checkBox6"
android:layout_toEndOf="#+id/checkBox6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="APU"
android:id="#+id/textView8"
android:textSize="25sp"
android:layout_below="#+id/textView7"
android:layout_alignParentLeft="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="start"
android:id="#+id/checkBox10"
android:layout_below="#+id/textView7"
android:layout_alignLeft="#+id/checkBox8"
android:layout_alignStart="#+id/checkBox8"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="APU Generatars"
android:id="#+id/textView9"
android:textSize="25sp"
android:layout_below="#+id/checkBox10"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox12"
android:layout_below="#+id/checkBox10"
android:layout_alignLeft="#+id/checkBox10"
android:layout_alignStart="#+id/checkBox10" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox13"
android:layout_below="#+id/checkBox10"
android:layout_alignLeft="#+id/checkBox9"
android:layout_alignStart="#+id/checkBox9" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="YAW Damper"
android:id="#+id/textView10"
android:textSize="25sp"
android:layout_below="#+id/checkBox12"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox14"
android:layout_alignTop="#+id/textView10"
android:layout_alignLeft="#+id/checkBox12"
android:layout_alignStart="#+id/checkBox12" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox15"
android:layout_alignTop="#+id/checkBox14"
android:layout_alignLeft="#+id/checkBox13"
android:layout_alignStart="#+id/checkBox13" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Galley"
android:id="#+id/textView11"
android:textSize="25sp"
android:layout_below="#+id/checkBox14"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox11"
android:layout_below="#+id/checkBox14"
android:layout_alignLeft="#+id/checkBox14"
android:layout_alignStart="#+id/checkBox14" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox16"
android:layout_below="#+id/checkBox15"
android:layout_toRightOf="#+id/checkBox6"
android:layout_toEndOf="#+id/checkBox6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Emergency Exit Lights"
android:id="#+id/textV_iew12"
android:textSize="25sp"
android:layout_below="#+id/checkBox11"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="#+id/checkBox11"
android:layout_toStartOf="#+id/checkBox11" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox17"
android:layout_alignTop="#+id/textView12"
android:layout_toRightOf="#+id/textView12"
android:layout_toEndOf="#+id/textView12" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox18"
android:layout_alignParentBottom="true"
android:layout_alignLeft="#+id/checkBox16"
android:layout_alignStart="#+id/checkBox16" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="No Smoking"
android:id="#+id/textView12_"
android:textSize="25sp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox19"
android:layout_alignTop="#+id/textView12"
android:layout_toRightOf="#+id/textView12"
android:layout_toEndOf="#+id/textView12" />
</LinearLayout>
</ScrollView>
Related
I tried to display the code in android studio and got this error:
Exception raised during rendering: Circular dependencies cannot exist in RelativeLayout.
I tried changing the code in many spots but nothing seemed to help.....
In the layout i was trying to make a line of text boxes and two parallel lines of TextView. I would like to keep this design so that it stays that way. so if someone has an answer that keeps it in place and fixes the problem i would be very great-full if he posted it.
this is my code:
<TextView
android:text="#string/added"
android:textSize="45sp"
android:id="#+id/welcome_name4"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView5"
android:textColor="#000"
android:layout_below="#+id/welcome_name4"
android:layout_alignLeft="#+id/textView6"
android:layout_alignStart="#+id/textView6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView6"
android:textColor="#000"
android:layout_below="#+id/textView5"
android:layout_alignLeft="#+id/textView7"
android:layout_alignStart="#+id/textView7" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView7"
android:textColor="#000"
android:layout_below="#+id/textView6"
android:layout_alignLeft="#+id/textView8"
android:layout_alignStart="#+id/textView8" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView8"
android:textColor="#000"
android:layout_above="#+id/textView7"
android:layout_alignLeft="#+id/textView9"
android:layout_alignStart="#+id/textView9" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView9"
android:textColor="#000"
android:layout_alignTop="#+id/textView8"
android:layout_alignLeft="#+id/textView10"
android:layout_alignStart="#+id/textView10" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView10"
android:textColor="#000"
android:layout_below="#+id/textView9"
android:layout_alignLeft="#+id/textView11"
android:layout_alignStart="#+id/textView11" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView11"
android:textColor="#000"
android:layout_below="#+id/textView10"
android:layout_alignLeft="#+id/textView12"
android:layout_alignStart="#+id/textView12" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView12"
android:textColor="#000"
android:layout_alignTop="#+id/textView32"
android:layout_alignLeft="#+id/textView13"
android:layout_alignStart="#+id/textView13" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView13"
android:textColor="#000"
android:layout_below="#+id/textView12"
android:layout_alignLeft="#+id/textView10"
android:layout_alignStart="#+id/textView10" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView14"
android:textColor="#000"
android:layout_below="#+id/textView13"
android:layout_alignLeft="#+id/textView13"
android:layout_alignStart="#+id/textView13" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView15"
android:textColor="#000"
android:layout_below="#+id/textView14"
android:layout_alignStart="#+id/textView16"
android:layout_alignLeft="#+id/textView16"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView16"
android:textColor="#000"
android:layout_below="#+id/textView15"
android:layout_toLeftOf="#+id/cb11"
android:layout_toStartOf="#+id/cb11" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView17"
android:textColor="#000"
android:layout_above="#+id/textView18"
android:layout_alignStart="#+id/textView15"
android:layout_alignLeft="#+id/textView15"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView18"
android:textColor="#000"
android:layout_alignTop="#+id/textView38"
android:layout_alignLeft="#+id/textView17"
android:layout_alignStart="#+id/textView17" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView19"
android:textColor="#000"
android:layout_below="#+id/textView18"
android:layout_alignLeft="#+id/textView18"
android:layout_alignStart="#+id/textView18" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView20"
android:textColor="#000"
android:layout_below="#+id/textView19"
android:layout_alignLeft="#+id/textView19"
android:layout_alignStart="#+id/textView19" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView21"
android:textColor="#000"
android:layout_below="#+id/textView20"
android:layout_alignLeft="#+id/textView18"
android:layout_alignStart="#+id/textView18" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView22"
android:textColor="#000"
android:layout_below="#+id/textView21"
android:layout_alignLeft="#+id/textView21"
android:layout_alignStart="#+id/textView21" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView23"
android:textColor="#000"
android:layout_alignTop="#+id/textView43"
android:layout_alignLeft="#+id/textView24"
android:layout_alignStart="#+id/textView24" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView24"
android:textColor="#000"
android:layout_alignTop="#+id/textView23"
android:layout_alignLeft="#+id/textView22"
android:layout_alignStart="#+id/textView22" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView25"
android:layout_above="#+id/textView6"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView26"
android:layout_below="#+id/textView25"
android:layout_alignRight="#+id/welcome_name4"
android:layout_alignEnd="#+id/welcome_name4" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView27"
android:layout_below="#+id/textView26"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView28"
android:layout_below="#+id/textView27"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView29"
android:layout_below="#+id/textView28"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView30"
android:layout_below="#+id/textView29"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView31"
android:layout_below="#+id/textView30"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView32"
android:layout_below="#+id/textView31"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView33"
android:layout_below="#+id/textView32"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView34"
android:layout_below="#+id/textView33"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView35"
android:layout_below="#+id/textView34"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView36"
android:layout_below="#+id/textView35"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView37"
android:layout_below="#+id/textView36"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView38"
android:layout_below="#+id/textView37"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView39"
android:layout_below="#+id/textView38"
android:layout_alignRight="#+id/welcome_name4"
android:layout_alignEnd="#+id/welcome_name4" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView40"
android:layout_alignTop="#+id/textView20"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView41"
android:layout_below="#+id/textView40"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView42"
android:layout_below="#+id/textView41"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView43"
android:layout_below="#+id/textView42"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="#+id/textView44"
android:layout_below="#+id/textView43"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:textColor="#000"/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:onClick="deleteMember"
android:id="#+id/cb1"
android:tag="1"
android:layout_above="#+id/textView6"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/welcome_name4" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:onClick="deleteMember"
android:id="#+id/cb2"
android:tag="2"
android:layout_below="#+id/textView5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignBottom="#+id/textView6" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="3"
android:onClick="deleteMember"
android:id="#+id/cb3"
android:layout_alignTop="#+id/textView7"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="#+id/textView8" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="4"
android:onClick="deleteMember"
android:id="#+id/cb4"
android:layout_below="#+id/cb3"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignBottom="#+id/textView8" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="5"
android:onClick="deleteMember"
android:id="#+id/cb5"
android:layout_alignTop="#+id/textView9"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="#+id/textView10" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="6"
android:onClick="deleteMember"
android:id="#+id/cb6"
android:layout_below="#+id/cb5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="#+id/textView11" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="7"
android:onClick="deleteMember"
android:id="#+id/cb7"
android:layout_below="#+id/textView10"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignBottom="#+id/textView11" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="deleteMember"
android:tag="8"
android:id="#+id/cb8"
android:layout_alignTop="#+id/textView12"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="#+id/textView13"
android:checked="false" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="9"
android:onClick="deleteMember"
android:id="#+id/cb9"
android:layout_below="#+id/textView12"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="#+id/textView14" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="10"
android:onClick="deleteMember"
android:id="#+id/cb10"
android:layout_below="#+id/textView13"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignBottom="#+id/textView14" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="11"
android:onClick="deleteMember"
android:id="#+id/cb11"
android:layout_below="#+id/cb10"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="#+id/textView16" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="12"
android:onClick="deleteMember"
android:id="#+id/cb12"
android:layout_below="#+id/cb11"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="#+id/textView17" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="13"
android:onClick="deleteMember"
android:id="#+id/cb13"
android:layout_below="#+id/textView16"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignBottom="#+id/textView17" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="14"
android:onClick="deleteMember"
android:id="#+id/cb14"
android:layout_alignTop="#+id/textView18"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="#+id/textView19" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="15"
android:onClick="deleteMember"
android:id="#+id/cb15"
android:layout_below="#+id/textView18"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="#+id/textView20" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="16"
android:onClick="deleteMember"
android:id="#+id/cb16"
android:layout_below="#+id/textView19"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="#+id/textView21" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="17"
android:onClick="deleteMember"
android:id="#+id/cb17"
android:layout_below="#+id/textView20"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="#+id/textView22" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="18"
android:onClick="deleteMember"
android:id="#+id/cb18"
android:layout_below="#+id/textView21"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignBottom="#+id/textView22" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="19"
android:onClick="deleteMember"
android:id="#+id/cb19"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/textView22"
android:layout_alignBottom="#+id/textView23" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:tag="20"
android:onClick="deleteMember"
android:id="#+id/cb20"
android:layout_below="#+id/textView23"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignBottom="#+id/textView44" />
Thanks a lot for helping:)
Your Views are referring to each other in a bidirectional way, which causes the circular dependency that you should not have.
For example: textView5's position in the layout is based on textView6's position, but textView6's position is also based on textView5's position. This dependency should be only one-way.
I am trying to do a checklist in android studio. But I don't pretty sure if I use the scrollView correctly. Right now the text which I wanna move to the next page pile up one the first one on the top of the phone.(1)
Please tell me how to do.
THANKS IN ADVANCE.
(1):Screen
http://imgur.com/ETzba60
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="#+id/scrollView"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Battery"
android:id="#+id/textView2"
android:textSize="25sp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox"
android:layout_alignParentTop="true"
android:layout_toLeftOf="#+id/checkBox2"
android:layout_toStartOf="#+id/checkBox2" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox2"
android:layout_marginRight="57dp"
android:layout_marginEnd="57dp"
android:layout_above="#+id/textView3"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Standby Power"
android:id="#+id/textView3"
android:textSize="25sp"
android:layout_below="#+id/checkBox"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox3"
android:layout_alignTop="#+id/textView3"
android:layout_toLeftOf="#+id/checkBox4"
android:layout_toStartOf="#+id/checkBox4" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox4"
android:layout_alignTop="#+id/checkBox3"
android:layout_toRightOf="#+id/checkBox"
android:layout_toEndOf="#+id/checkBox" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Parking Brake"
android:id="#+id/textView4"
android:textSize="25sp"
android:layout_below="#+id/checkBox3"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="test"
android:id="#+id/checkBox5"
android:layout_below="#+id/checkBox3"
android:layout_alignLeft="#+id/checkBox3"
android:layout_alignStart="#+id/checkBox3"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Fire Warning System"
android:id="#+id/textView5"
android:textSize="25sp"
android:layout_below="#+id/checkBox5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/textView3"
android:layout_alignEnd="#+id/textView3" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="test"
android:id="#+id/checkBox7"
android:layout_below="#+id/checkBox5"
android:layout_alignLeft="#+id/checkBox5"
android:layout_alignStart="#+id/checkBox5"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="EXT Test Switch"
android:id="#+id/textView6"
android:textSize="25sp"
android:layout_below="#+id/textView5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/textView5"
android:layout_alignEnd="#+id/textView5" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="test"
android:id="#+id/checkBox6"
android:layout_alignTop="#+id/textView6"
android:layout_alignLeft="#+id/checkBox7"
android:layout_alignStart="#+id/checkBox7"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Left Forward Fuel Pump"
android:id="#+id/textView7"
android:textSize="25sp"
android:layout_below="#+id/textView6"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/textView6"
android:layout_alignEnd="#+id/textView6" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox8"
android:layout_below="#+id/textView6"
android:layout_alignLeft="#+id/checkBox6"
android:layout_alignStart="#+id/checkBox6" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox9"
android:layout_alignTop="#+id/checkBox8"
android:layout_toRightOf="#+id/checkBox6"
android:layout_toEndOf="#+id/checkBox6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="APU"
android:id="#+id/textView8"
android:textSize="25sp"
android:layout_below="#+id/textView7"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="start"
android:id="#+id/checkBox10"
android:layout_below="#+id/textView7"
android:layout_alignLeft="#+id/checkBox8"
android:layout_alignStart="#+id/checkBox8"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="APU Generatars"
android:id="#+id/textView9"
android:textSize="25sp"
android:layout_below="#+id/checkBox10"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox12"
android:layout_below="#+id/checkBox10"
android:layout_alignLeft="#+id/checkBox10"
android:layout_alignStart="#+id/checkBox10" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox13"
android:layout_below="#+id/checkBox10"
android:layout_alignLeft="#+id/checkBox9"
android:layout_alignStart="#+id/checkBox9" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="YAW Damper"
android:id="#+id/textView10"
android:textSize="25sp"
android:layout_below="#+id/checkBox12"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox14"
android:layout_alignTop="#+id/textView10"
android:layout_alignLeft="#+id/checkBox12"
android:layout_alignStart="#+id/checkBox12" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox15"
android:layout_alignTop="#+id/checkBox14"
android:layout_alignLeft="#+id/checkBox13"
android:layout_alignStart="#+id/checkBox13" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Galley"
android:id="#+id/textView11"
android:textSize="25sp"
android:layout_below="#+id/checkBox14"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox11"
android:layout_below="#+id/checkBox14"
android:layout_alignLeft="#+id/checkBox14"
android:layout_alignStart="#+id/checkBox14" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox16"
android:layout_below="#+id/checkBox15"
android:layout_toRightOf="#+id/checkBox6"
android:layout_toEndOf="#+id/checkBox6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Emergency Exit Lights"
android:id="#+id/textView12"
android:textSize="25sp"
android:layout_below="#+id/checkBox11"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="#+id/checkBox11"
android:layout_toStartOf="#+id/checkBox11" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox17"
android:layout_alignTop="#+id/textView12"
android:layout_toRightOf="#+id/textView12"
android:layout_toEndOf="#+id/textView12" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox18"
android:layout_alignParentBottom="true"
android:layout_alignLeft="#+id/checkBox16"
android:layout_alignStart="#+id/checkBox16" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="No Smoking"
android:id="#+id/textView12"
android:textSize="25sp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox19"
android:layout_alignTop="#+id/textView12"
android:layout_toRightOf="#+id/textView12"
android:layout_toEndOf="#+id/textView12" />
</RelativeLayout>
</ScrollView>
ScrollView can have only on root element inside it, so what you can do is have on linear layout inside scrollview and than populate rest inside Linearlayout
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="#+id/scrollView"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Battery"
android:id="#+id/textView2"
android:textSize="25sp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox"
android:layout_alignParentTop="true"
android:layout_toLeftOf="#+id/checkBox2"
android:layout_toStartOf="#+id/checkBox2" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox2"
android:layout_marginRight="57dp"
android:layout_marginEnd="57dp"
android:layout_above="#+id/textView3"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Standby Power"
android:id="#+id/textView3"
android:textSize="25sp"
android:layout_below="#+id/checkBox"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox3"
android:layout_alignTop="#+id/textView3"
android:layout_toLeftOf="#+id/checkBox4"
android:layout_toStartOf="#+id/checkBox4" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox4"
android:layout_alignTop="#+id/checkBox3"
android:layout_toRightOf="#+id/checkBox"
android:layout_toEndOf="#+id/checkBox" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Parking Brake"
android:id="#+id/textView4"
android:textSize="25sp"
android:layout_below="#+id/checkBox3"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="test"
android:id="#+id/checkBox5"
android:layout_below="#+id/checkBox3"
android:layout_alignLeft="#+id/checkBox3"
android:layout_alignStart="#+id/checkBox3"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Fire Warning System"
android:id="#+id/textView5"
android:textSize="25sp"
android:layout_below="#+id/checkBox5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/textView3"
android:layout_alignEnd="#+id/textView3" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="test"
android:id="#+id/checkBox7"
android:layout_below="#+id/checkBox5"
android:layout_alignLeft="#+id/checkBox5"
android:layout_alignStart="#+id/checkBox5"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="EXT Test Switch"
android:id="#+id/textView6"
android:textSize="25sp"
android:layout_below="#+id/textView5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/textView5"
android:layout_alignEnd="#+id/textView5" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="test"
android:id="#+id/checkBox6"
android:layout_alignTop="#+id/textView6"
android:layout_alignLeft="#+id/checkBox7"
android:layout_alignStart="#+id/checkBox7"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Left Forward Fuel Pump"
android:id="#+id/textView7"
android:textSize="25sp"
android:layout_below="#+id/textView6"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignRight="#+id/textView6"
android:layout_alignEnd="#+id/textView6" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox8"
android:layout_below="#+id/textView6"
android:layout_alignLeft="#+id/checkBox6"
android:layout_alignStart="#+id/checkBox6" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox9"
android:layout_alignTop="#+id/checkBox8"
android:layout_toRightOf="#+id/checkBox6"
android:layout_toEndOf="#+id/checkBox6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="APU"
android:id="#+id/textView8"
android:textSize="25sp"
android:layout_below="#+id/textView7"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="start"
android:id="#+id/checkBox10"
android:layout_below="#+id/textView7"
android:layout_alignLeft="#+id/checkBox8"
android:layout_alignStart="#+id/checkBox8"
android:checked="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="APU Generatars"
android:id="#+id/textView9"
android:textSize="25sp"
android:layout_below="#+id/checkBox10"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox12"
android:layout_below="#+id/checkBox10"
android:layout_alignLeft="#+id/checkBox10"
android:layout_alignStart="#+id/checkBox10" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox13"
android:layout_below="#+id/checkBox10"
android:layout_alignLeft="#+id/checkBox9"
android:layout_alignStart="#+id/checkBox9" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="YAW Damper"
android:id="#+id/textView10"
android:textSize="25sp"
android:layout_below="#+id/checkBox12"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox14"
android:layout_alignTop="#+id/textView10"
android:layout_alignLeft="#+id/checkBox12"
android:layout_alignStart="#+id/checkBox12" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox15"
android:layout_alignTop="#+id/checkBox14"
android:layout_alignLeft="#+id/checkBox13"
android:layout_alignStart="#+id/checkBox13" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Galley"
android:id="#+id/textView11"
android:textSize="25sp"
android:layout_below="#+id/checkBox14"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox11"
android:layout_below="#+id/checkBox14"
android:layout_alignLeft="#+id/checkBox14"
android:layout_alignStart="#+id/checkBox14" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox16"
android:layout_below="#+id/checkBox15"
android:layout_toRightOf="#+id/checkBox6"
android:layout_toEndOf="#+id/checkBox6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Emergency Exit Lights"
android:id="#+id/textView12"
android:textSize="25sp"
android:layout_below="#+id/checkBox11"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="#+id/checkBox11"
android:layout_toStartOf="#+id/checkBox11" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox17"
android:layout_alignTop="#+id/textView12"
android:layout_toRightOf="#+id/textView12"
android:layout_toEndOf="#+id/textView12" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="off"
android:id="#+id/checkBox18"
android:layout_alignParentBottom="true"
android:layout_alignLeft="#+id/checkBox16"
android:layout_alignStart="#+id/checkBox16" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="No Smoking"
android:id="#+id/textView12"
android:textSize="25sp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:text="on"
android:id="#+id/checkBox19"
android:layout_alignTop="#+id/textView12"
android:layout_toRightOf="#+id/textView12"
android:layout_toEndOf="#+id/textView12" />
</LinearLayout>
</ScrollView>
ScrollView can host only one direct child
and if there are more than one, Wrap the Views inside of a LinearLayout/Relative Layout/Frame layout whichever you are comfortable with so the ScrollView has only the LinearLayout as a direct child.
I m using android studio 1.0.... In design ,my screen is get filled and when it runs it needs to scroll down but its not ... I tried previous answers an add scroll view in layout but there is error ( Scroll view can host only one child) enter code here
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="#+id/ScrollView">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="INTRODUCTION:"
android:id="#+id/heading1"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:textAlignment="center"
android:phoneNumber="false"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="#string/Introduction"
android:id="#+id/textView2"
android:layout_below="#+id/heading1"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="HYDROCARBON:"
android:id="#+id/textView3"
android:layout_below="#+id/textView2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="#string/hydrocarbon"
android:id="#+id/textView4"
android:layout_below="#+id/textView3"
android:layout_alignLeft="#+id/textView2"
android:layout_alignStart="#+id/textView2" />
<ImageView
android:layout_width="150dp"
android:layout_height="150dp"
android:id="#+id/imageView"
android:layout_below="#+id/textView4"
android:layout_centerHorizontal="true"
android:src="#drawable/ethane"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="TYPES OF HYDROCARBON:"
android:id="#+id/textView5"
android:layout_below="#+id/imageView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="#string/types"
android:id="#+id/textView6"
android:layout_below="#+id/textView5"
android:layout_alignLeft="#+id/textView4"
android:layout_alignStart="#+id/textView4" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Alkane"
android:id="#+id/textView7"
android:layout_below="#+id/textView6"
android:layout_alignLeft="#+id/textView6"
android:layout_alignStart="#+id/textView6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Alkene"
android:id="#+id/textView8"
android:layout_below="#+id/textView7"
android:layout_alignLeft="#+id/textView7"
android:layout_alignStart="#+id/textView7" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Alkyne"
android:id="#+id/textView9"
android:layout_below="#+id/textView8"
android:layout_alignLeft="#+id/textView8"
android:layout_alignStart="#+id/textView8" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BACK"
android:id="#+id/button2"
android:onClick="mainPage"
android:layout_below="#+id/textView9"
android:layout_alignRight="#+id/textView8"
android:layout_alignEnd="#+id/textView8" />
This should help
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="#+id/ScrollView">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/RelativeLayout">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="INTRODUCTION:"
android:id="#+id/heading1"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:textAlignment="center"
android:phoneNumber="false"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="#string/Introduction"
android:id="#+id/textView2"
android:layout_below="#+id/heading1"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="HYDROCARBON:"
android:id="#+id/textView3"
android:layout_below="#+id/textView2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="#string/hydrocarbon"
android:id="#+id/textView4"
android:layout_below="#+id/textView3"
android:layout_alignLeft="#+id/textView2"
android:layout_alignStart="#+id/textView2" />
<ImageView
android:layout_width="150dp"
android:layout_height="150dp"
android:id="#+id/imageView"
android:layout_below="#+id/textView4"
android:layout_centerHorizontal="true"
android:src="#drawable/ethane" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="TYPES OF HYDROCARBON:"
android:id="#+id/textView5"
android:layout_below="#+id/imageView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="#string/types"
android:id="#+id/textView6"
android:layout_below="#+id/textView5"
android:layout_alignLeft="#+id/textView4"
android:layout_alignStart="#+id/textView4" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Alkane"
android:id="#+id/textView7"
android:layout_below="#+id/textView6"
android:layout_alignLeft="#+id/textView6"
android:layout_alignStart="#+id/textView6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Alkene"
android:id="#+id/textView8"
android:layout_below="#+id/textView7"
android:layout_alignLeft="#+id/textView7"
android:layout_alignStart="#+id/textView7" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Alkyne"
android:id="#+id/textView9"
android:layout_below="#+id/textView8"
android:layout_alignLeft="#+id/textView8"
android:layout_alignStart="#+id/textView8" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BACK"
android:id="#+id/button2"
android:onClick="mainPage"
android:layout_below="#+id/textView9"
android:layout_alignRight="#+id/textView8"
android:layout_alignEnd="#+id/textView8" />
</RelativeLayout>
</ScrollView>
Scroll view tag can have only one child element
Put your content of scroll view in linear layout.
<ScrollView>
<LinearLayout>
.......
.......
.....
</LinearLayout>
</ScrollView>
Here I have a RelativeLayout with TextViews, Spinners ect. The TextViews change according to the progress value of the respective Spinner. I want my TextViews to remain in the current position and not shift the match the length of the growing parents progress value.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<Space
android:id="#+id/Space1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" />
<Space
android:id="#+id/Space2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/Space1" />
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="42dp"
android:layout_marginLeft="40dp"
android:layout_marginRight="42dp"
android:layout_marginTop="50dp"
android:scaleType="fitXY"
android:src="#drawable/primaryneedsbg" />
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/imageView2"
android:layout_alignTop="#+id/imageView2"
android:layout_marginLeft="41dp"
android:layout_marginTop="79dp"
android:text="#string/housing"
android:textAppearance="?android:attr/textAppearanceLarge"
android:includeFontPadding="false"/>
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView1"
android:layout_below="#+id/textView1"
android:layout_marginTop="26dp"
android:text="#string/debt"
android:textAppearance="?android:attr/textAppearanceLarge"
android:includeFontPadding="false" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView2"
android:layout_below="#+id/textView2"
android:layout_marginTop="25dp"
android:text="#string/child"
android:textAppearance="?android:attr/textAppearanceLarge"
android:includeFontPadding="false" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView3"
android:layout_below="#+id/textView3"
android:layout_marginTop="25dp"
android:text="#string/edu"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView4"
android:layout_below="#+id/textView4"
android:layout_marginTop="30dp"
android:text="#string/exp"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView5"
android:layout_below="#+id/textView5"
android:layout_marginTop="25dp"
android:text="#string/special"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView6"
android:layout_below="#+id/textView6"
android:layout_marginTop="25dp"
android:text="#string/surv"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView1"
android:layout_marginLeft="176dp"
android:layout_toRightOf="#+id/textView1"
android:freezesText="true"
android:text="$0"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView2"
android:layout_alignBottom="#+id/textView2"
android:layout_alignParentStart="false"
android:layout_alignRight="#+id/textView8"
android:freezesText="true"
android:text="$0"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView3"
android:layout_alignBottom="#+id/textView3"
android:layout_alignLeft="#+id/textView9"
android:text="$0"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView4"
android:layout_alignBottom="#+id/textView4"
android:layout_alignLeft="#+id/textView10"
android:text="$0"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView5"
android:layout_alignBottom="#+id/textView5"
android:layout_alignLeft="#+id/textView11"
android:text="$0"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView6"
android:layout_alignBottom="#+id/textView6"
android:layout_alignLeft="#+id/textView12"
android:text="$0"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView7"
android:layout_alignBottom="#+id/textView7"
android:layout_alignLeft="#+id/textView13"
android:text="$0"
android:textAppearance="?android:attr/textAppearanceLarge" />
<SeekBar
android:id="#+id/seekBar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/textView2"
android:layout_toLeftOf="#+id/imageView1"
android:layout_toRightOf="#+id/button1" />
<Button
android:id="#+id/button2"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/textView9"
android:layout_alignRight="#+id/imageView2"
android:layout_alignTop="#+id/button1"
android:layout_marginRight="219dp"
android:background="#null"
android:text="+"
android:textStyle="bold" />
<ImageView
android:id="#+id/imageView1"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignLeft="#+id/button2"
android:layout_alignTop="#+id/seekBar1"
android:layout_marginLeft="48dp"
android:scaleType="fitXY"
android:src="#drawable/cross" />
<Button
android:id="#+id/button4"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/textView2"
android:layout_alignRight="#+id/imageView2"
android:text="#string/Perm" />
<Button
android:id="#+id/Button01"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView9"
android:layout_alignBottom="#+id/textView9"
android:layout_alignLeft="#+id/button1"
android:background="#null"
android:text="-"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="#+id/Button04"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView10"
android:layout_alignBottom="#+id/textView10"
android:layout_toLeftOf="#+id/seekBar1"
android:background="#null"
android:text="-"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="#+id/Button06"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView14"
android:layout_alignBottom="#+id/textView14"
android:layout_toLeftOf="#+id/seekBar1"
android:background="#null"
android:text="-"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="#+id/Button05"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView13"
android:layout_alignBottom="#+id/textView13"
android:layout_alignLeft="#+id/Button06"
android:background="#null"
android:text="-"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="#+id/Button02"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView12"
android:layout_alignBottom="#+id/textView12"
android:layout_toLeftOf="#+id/seekBar1"
android:background="#null"
android:text="-"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="#+id/Button03"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView11"
android:layout_alignBottom="#+id/textView11"
android:layout_toRightOf="#+id/textView8"
android:background="#null"
android:textSize="25dp"
android:textStyle="bold" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView9"
android:layout_alignLeft="#+id/seekBar1"
android:layout_alignRight="#+id/seekBar1" />
<SeekBar
android:id="#+id/SeekBar04"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/seekBar2"
android:layout_alignTop="#+id/textView10"
android:layout_toLeftOf="#+id/button2" />
<SeekBar
android:id="#+id/SeekBar03"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/SeekBar04"
android:layout_alignRight="#+id/SeekBar04"
android:layout_alignTop="#+id/textView11" />
<SeekBar
android:id="#+id/SeekBar02"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/SeekBar03"
android:layout_alignTop="#+id/textView12"
android:layout_toLeftOf="#+id/button2" />
<SeekBar
android:id="#+id/SeekBar01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/SeekBar02"
android:layout_alignRight="#+id/SeekBar02"
android:layout_alignTop="#+id/textView13" />
<SeekBar
android:id="#+id/seekBar3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/Button06"
android:layout_alignLeft="#+id/SeekBar01"
android:layout_alignRight="#+id/SeekBar01" />
<Button
android:id="#+id/Button12"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/Button01"
android:layout_alignBottom="#+id/Button01"
android:layout_alignLeft="#+id/button2"
android:background="#null"
android:text="+"
android:textStyle="bold" />
<Button
android:id="#+id/Button11"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/Button04"
android:layout_alignBottom="#+id/Button04"
android:layout_alignLeft="#+id/Button12"
android:background="#null"
android:text="+"
android:textStyle="bold" />
<Button
android:id="#+id/Button07"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/Button08"
android:layout_alignTop="#+id/seekBar3"
android:background="#null"
android:text="+"
android:textStyle="bold" />
<Button
android:id="#+id/Button08"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/Button05"
android:layout_alignBottom="#+id/Button05"
android:layout_alignLeft="#+id/Button09"
android:background="#null"
android:text="+"
android:textStyle="bold" />
<Button
android:id="#+id/Button09"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/Button10"
android:layout_alignTop="#+id/SeekBar02"
android:background="#null"
android:text="+"
android:textStyle="bold" />
<Button
android:id="#+id/Button10"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/Button02"
android:layout_alignLeft="#+id/Button11"
android:background="#null"
android:text="+"
android:textStyle="bold" />
<ImageView
android:id="#+id/ImageView07"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignTop="#+id/textView9"
android:layout_toRightOf="#+id/Button12"
android:scaleType="fitXY"
android:src="#drawable/cross" />
<ImageView
android:id="#+id/ImageView06"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignBottom="#+id/textView10"
android:layout_alignLeft="#+id/ImageView07"
android:scaleType="fitXY"
android:src="#drawable/cross" />
<ImageView
android:id="#+id/ImageView05"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignTop="#+id/SeekBar03"
android:layout_toRightOf="#+id/Button10"
android:scaleType="fitXY"
android:src="#drawable/cross" />
<ImageView
android:id="#+id/ImageView04"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignBottom="#+id/Button02"
android:layout_alignLeft="#+id/ImageView05"
android:scaleType="fitXY"
android:src="#drawable/cross" />
<ImageView
android:id="#+id/ImageView03"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignBottom="#+id/textView13"
android:layout_alignLeft="#+id/ImageView04"
android:scaleType="fitXY"
android:src="#drawable/cross" />
<ImageView
android:id="#+id/ImageView02"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignBottom="#+id/seekBar3"
android:layout_alignLeft="#+id/ImageView03"
android:scaleType="fitXY"
android:src="#drawable/cross" />
<Button
android:id="#+id/Button16"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/SeekBar03"
android:layout_toLeftOf="#+id/button4"
android:text="Temporary" />
<Button
android:id="#+id/button3"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/button1"
android:layout_toLeftOf="#+id/button4"
android:text="Temporary" />
<Button
android:id="#+id/Button18"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/textView3"
android:layout_toLeftOf="#+id/button4"
android:text="Temporary" />
<Button
android:id="#+id/Button17"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/SeekBar04"
android:layout_toLeftOf="#+id/button4"
android:text="Temporary" />
<Button
android:id="#+id/Button15"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/Button02"
android:layout_toLeftOf="#+id/button4"
android:text="Temporary" />
<Button
android:id="#+id/Button14"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/textView7"
android:layout_alignLeft="#+id/Button15"
android:text="Temporary" />
<Button
android:id="#+id/Button13"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/Button05"
android:layout_toLeftOf="#+id/button4"
android:text="Temporary" />
<Button
android:id="#+id/Button23"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/Button17"
android:layout_alignRight="#+id/imageView2"
android:layout_alignTop="#+id/Button17"
android:text="#string/Perm" />
<Button
android:id="#+id/Button21"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/Button14"
android:layout_alignRight="#+id/imageView2"
android:layout_alignTop="#+id/Button15"
android:text="#string/Perm" />
<Button
android:id="#+id/Button24"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/textView3"
android:layout_alignRight="#+id/imageView2"
android:layout_alignTop="#+id/Button18"
android:text="#string/Perm" />
<Button
android:id="#+id/Button22"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/Button21"
android:layout_alignRight="#+id/imageView2"
android:layout_alignTop="#+id/Button16"
android:text="#string/Perm" />
<Button
android:id="#+id/Button20"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/Button14"
android:layout_alignBottom="#+id/Button14"
android:layout_alignLeft="#+id/Button21"
android:text="#string/Perm" />
<Button
android:id="#+id/Button19"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/Button13"
android:layout_toRightOf="#+id/Button13"
android:text="#string/Perm" />
<Button
android:id="#+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView8"
android:layout_alignBottom="#+id/textView8"
android:layout_marginLeft="182dp"
android:layout_toRightOf="#+id/Button03"
android:background="#null"
android:text="-"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="#+id/Button25"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/Button03"
android:layout_alignBottom="#+id/Button03"
android:layout_toLeftOf="#+id/SeekBar03"
android:background="#null"
android:text="-"
android:textSize="25dp"
android:textStyle="bold" />
<TextView
android:id="#+id/textView15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView7"
android:layout_below="#+id/Button07"
android:text="#string/permNeeds"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/textView16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView15"
android:layout_below="#+id/textView15"
android:layout_marginTop="21dp"
android:text="#string/tempNeeds"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/textView17"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView16"
android:layout_below="#+id/textView16"
android:layout_marginTop="21dp"
android:text="#string/tNeeds:"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView18"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView15"
android:layout_alignBottom="#+id/textView15"
android:layout_alignLeft="#+id/textView14"
android:text="$0"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="#+id/textView19"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/textView17"
android:layout_alignLeft="#+id/textView18"
android:text="$0"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="#+id/textView20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView17"
android:layout_alignLeft="#+id/textView19"
android:text="$0"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textStyle="bold" />
<TextView
android:id="#+id/textView21"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/imageView2"
android:layout_toRightOf="#+id/imageView1"
android:text="#string/typeNeed"
android:textAppearance="?android:attr/textAppearanceMedium" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/textView1"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:scaleType="fitXY"
android:src="#drawable/lifebar" />
<TextView
android:id="#+id/textView22"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/imageView3"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="#string/lifebar4"
android:textAppearance="?android:attr/textAppearanceLarge" />
I want a page which has a static header and footer with scrollable content inside. This is my layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<LinearLayout
android:id="#+id/headerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/sendfunds" />
</LinearLayout>
<ScrollView
android:id="#+id/scrollablContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="#+id/footerView"
android:layout_below="#+id/headerView" >
<RelativeLayout
android:id="#+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="30dp"
android:layout_marginTop="26dp"
android:text="Balance"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="8pt"
android:textStyle="bold" />
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView1"
android:layout_centerHorizontal="true"
android:text="TextView" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView2"
android:layout_alignBottom="#+id/textView2"
android:layout_marginLeft="16dp"
android:layout_toRightOf="#+id/textView2"
android:text="TextView" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/textView1"
android:layout_marginTop="34dp"
android:text="WHO ARE YOU SENDING MONEY TO?"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="8pt" />
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView4"
android:layout_marginTop="35dp"
android:text="Recipient Name"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText1"
android:layout_width="170dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView5"
android:layout_alignBottom="#+id/textView5"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText1"
android:layout_marginTop="25dp"
android:text="Recipient Email"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView6"
android:layout_alignBottom="#+id/textView6"
android:layout_alignLeft="#+id/editText1"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/editText2"
android:layout_marginTop="37dp"
android:text="HOW MUCH DO YOU WANT TO SEND?"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="8pt" />
<TextView
android:id="#+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView7"
android:layout_marginTop="34dp"
android:text="Amount"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView8"
android:layout_alignBottom="#+id/textView8"
android:layout_alignLeft="#+id/editText2"
android:layout_alignParentRight="true"
android:ems="10" >
<requestFocus />
</EditText>
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText3"
android:layout_marginTop="24dp"
android:text="Wallet Cat."
android:textAppearance="?android:attr/textAppearanceMedium" />
<Spinner
android:id="#+id/spinner1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editText3"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/textView9" />
<TextView
android:id="#+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView9"
android:layout_alignBottom="#+id/textView9"
android:layout_alignLeft="#+id/spinner1"
android:layout_marginLeft="22dp"
android:text="TextView"
android:visibility="gone" />
<TextView
android:id="#+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView9"
android:layout_marginTop="35dp"
android:text="Pay Ref."
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView11"
android:layout_alignLeft="#+id/spinner1"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView11"
android:layout_marginTop="27dp"
android:text="Detail Ref."
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView12"
android:layout_alignLeft="#+id/editText4"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView12"
android:layout_marginTop="39dp"
android:text="Date of Birth"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView13"
android:layout_alignLeft="#+id/editText5"
android:ems="10" />
<TextView
android:id="#+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView13"
android:layout_marginTop="40dp"
android:text="Password"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView14"
android:layout_alignLeft="#+id/editText6"
android:layout_alignParentRight="true"
android:ems="10" />
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/editText7"
android:layout_marginTop="37dp"
android:layout_toLeftOf="#+id/textView3"
android:text="Submit" />
</RelativeLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/footerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/wallet_ic" />
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView1"
android:src="#drawable/send_ic_hover" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView2"
android:src="#drawable/upload_ic" />
<ImageView
android:id="#+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView3"
android:src="#drawable/history1" />
<ImageView
android:id="#+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView4"
android:src="#drawable/more" />
</RelativeLayout>
</RelativeLayout>
With this I have the static header and footer but some of the scrollable content is missing. I tried increasing the height of the ScrollView and layout and fillViewport=true but no luck. How should I increase the height of the middle layout?
You can solve this by using a LinearLayout container instead of RelativeLayout container.
The container should have 3 children: Header, Content, and Footer. Where the Content's height is set to fill the remaining space. You can do that by using the weight attribute:
android:layout_height="0dp"
android:layout_weight="1"
Use this code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<LinearLayout
android:id="#+id/headerView"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/sendfunds" />
</LinearLayout>
<ScrollView
android:id="#+id/scrollablContent"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<RelativeLayout
android:id="#+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- Your Content -->
</RelativeLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/footerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/wallet_ic" />
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView1"
android:src="#drawable/send_ic_hover" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView2"
android:src="#drawable/upload_ic" />
<ImageView
android:id="#+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView3"
android:src="#drawable/history1" />
<ImageView
android:id="#+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView4"
android:src="#drawable/more" />
</RelativeLayout>
</LinearLayout>
Notice that using
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true
is meaningless within LinearLayout. So this:
<LinearLayout
android:id="#+id/headerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/sendfunds" />
</LinearLayout>
is wrong.
try this layout with small change in your layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<LinearLayout
android:id="#+id/headerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/sendfunds" />
</LinearLayout>
<RelativeLayout
android:id="#+id/footerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/wallet_ic" />
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView1"
android:src="#drawable/send_ic_hover" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView2"
android:src="#drawable/upload_ic" />
<ImageView
android:id="#+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView3"
android:src="#drawable/history1" />
<ImageView
android:id="#+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView4"
android:src="#drawable/more" />
</RelativeLayout>
<ScrollView
android:id="#+id/scrollablContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="#+id/footerView"
android:layout_below="#+id/headerView" >
<RelativeLayout
android:id="#+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="30dp"
android:layout_marginTop="26dp"
android:text="Balance"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="8pt"
android:textStyle="bold" />
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView1"
android:layout_centerHorizontal="true"
android:text="TextView" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView2"
android:layout_alignBottom="#+id/textView2"
android:layout_marginLeft="16dp"
android:layout_toRightOf="#+id/textView2"
android:text="TextView" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/textView1"
android:layout_marginTop="34dp"
android:text="WHO ARE YOU SENDING MONEY TO?"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="8pt" />
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView4"
android:layout_marginTop="35dp"
android:text="Recipient Name"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText1"
android:layout_width="170dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView5"
android:layout_alignBottom="#+id/textView5"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText1"
android:layout_marginTop="25dp"
android:text="Recipient Email"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView6"
android:layout_alignBottom="#+id/textView6"
android:layout_alignLeft="#+id/editText1"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/editText2"
android:layout_marginTop="37dp"
android:text="HOW MUCH DO YOU WANT TO SEND?"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="8pt" />
<TextView
android:id="#+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView7"
android:layout_marginTop="34dp"
android:text="Amount"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView8"
android:layout_alignBottom="#+id/textView8"
android:layout_alignLeft="#+id/editText2"
android:layout_alignParentRight="true"
android:ems="10" >
<requestFocus />
</EditText>
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText3"
android:layout_marginTop="24dp"
android:text="Wallet Cat."
android:textAppearance="?android:attr/textAppearanceMedium" />
<Spinner
android:id="#+id/spinner1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editText3"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/textView9" />
<TextView
android:id="#+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView9"
android:layout_alignBottom="#+id/textView9"
android:layout_alignLeft="#+id/spinner1"
android:layout_marginLeft="22dp"
android:text="TextView"
android:visibility="gone" />
<TextView
android:id="#+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView9"
android:layout_marginTop="35dp"
android:text="Pay Ref."
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView11"
android:layout_alignLeft="#+id/spinner1"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView11"
android:layout_marginTop="27dp"
android:text="Detail Ref."
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView12"
android:layout_alignLeft="#+id/editText4"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView12"
android:layout_marginTop="39dp"
android:text="Date of Birth"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView13"
android:layout_alignLeft="#+id/editText5"
android:ems="10" />
<TextView
android:id="#+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView13"
android:layout_marginTop="40dp"
android:text="Password"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView14"
android:layout_alignLeft="#+id/editText6"
android:layout_alignParentRight="true"
android:ems="10" />
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/editText7"
android:layout_marginTop="37dp"
android:layout_toLeftOf="#+id/textView3"
android:text="Submit" />
</RelativeLayout>
</ScrollView>
</RelativeLayout>
try this
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:orientation=”vertical” >
<LinearLayout
android:id="#+id/headerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/sendfunds" />
</LinearLayout>
<ScrollView
android:id="#+id/scrollablContent"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=1
>
<RelativeLayout
android:id="#+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="30dp"
android:layout_marginTop="26dp"
android:text="Balance"
android:textStyle="bold"
android:textSize="8pt"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView1"
android:layout_centerHorizontal="true"
android:text="TextView" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView2"
android:layout_alignBottom="#+id/textView2"
android:layout_marginLeft="16dp"
android:layout_toRightOf="#+id/textView2"
android:text="TextView" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/textView1"
android:layout_marginTop="34dp"
android:text="WHO ARE YOU SENDING MONEY TO?"
android:textSize="8pt"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView4"
android:layout_marginTop="35dp"
android:text="Recipient Name"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText1"
android:layout_width="170dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView5"
android:layout_alignBottom="#+id/textView5"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText1"
android:layout_marginTop="25dp"
android:text="Recipient Email"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView6"
android:layout_alignBottom="#+id/textView6"
android:layout_alignLeft="#+id/editText1"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/editText2"
android:layout_marginTop="37dp"
android:text="HOW MUCH DO YOU WANT TO SEND?"
android:textSize="8pt"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView7"
android:layout_marginTop="34dp"
android:text="Amount"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView8"
android:layout_alignBottom="#+id/textView8"
android:layout_alignLeft="#+id/editText2"
android:layout_alignParentRight="true"
android:ems="10" >
<requestFocus />
</EditText>
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText3"
android:layout_marginTop="24dp"
android:text="Wallet Cat."
android:textAppearance="?android:attr/textAppearanceMedium" />
<Spinner
android:id="#+id/spinner1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editText3"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/textView9" />
<TextView
android:id="#+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView9"
android:layout_alignBottom="#+id/textView9"
android:layout_alignLeft="#+id/spinner1"
android:layout_marginLeft="22dp"
android:text="TextView"
android:visibility="gone" />
<TextView
android:id="#+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView9"
android:layout_marginTop="35dp"
android:text="Pay Ref."
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView11"
android:layout_alignLeft="#+id/spinner1"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView11"
android:layout_marginTop="27dp"
android:text="Detail Ref."
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView12"
android:layout_alignLeft="#+id/editText4"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView12"
android:layout_marginTop="39dp"
android:text="Date of Birth"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView13"
android:layout_alignLeft="#+id/editText5"
android:ems="10" />
<TextView
android:id="#+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView13"
android:layout_marginTop="40dp"
android:text="Password"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView14"
android:layout_alignLeft="#+id/editText6"
android:layout_alignParentRight="true"
android:ems="10" />
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/editText7"
android:layout_marginTop="37dp"
android:layout_toLeftOf="#+id/textView3"
android:text="Submit" />
</RelativeLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/footerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/wallet_ic" />
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView1"
android:src="#drawable/send_ic_hover" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView2"
android:src="#drawable/upload_ic" />
<ImageView
android:id="#+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView3"
android:src="#drawable/history1" />
<ImageView
android:id="#+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView4"
android:src="#drawable/more" />
</RelativeLayout>
</LinearLayout >