Why layout appears different in devices? - android

I am not sure why the views are different but not stable.
<?xml version="1.0" encoding="utf-8"?>
<Button
android:id="#+id/b"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/a"
android:layout_alignBottom="#+id/a"
android:layout_toRightOf="#+id/a"
android:gravity="center"
android:text="B"
android:textSize="25dp" />
<Button
android:id="#+id/c"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/b"
android:layout_alignBottom="#+id/b"
android:layout_toRightOf="#+id/b"
android:gravity="center"
android:text="C"
android:textSize="25dp" />
<Button
android:id="#+id/d"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/c"
android:layout_alignBottom="#+id/c"
android:layout_toRightOf="#+id/c"
android:gravity="center"
android:text="D"
android:textSize="25dp" />
<Button
android:id="#+id/e"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/d"
android:layout_alignBottom="#+id/d"
android:layout_toRightOf="#+id/d"
android:gravity="center"
android:text="E"
android:textSize="25dp" />
<Button
android:id="#+id/h"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/g"
android:layout_alignBottom="#+id/g"
android:layout_toLeftOf="#+id/c"
android:gravity="center"
android:text="H"
android:textSize="25dp" />
<Button
android:id="#+id/i"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/m"
android:layout_toRightOf="#+id/h"
android:gravity="center"
android:text="I"
android:textSize="25dp" />
<Button
android:id="#+id/j"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/n"
android:layout_toRightOf="#+id/i"
android:gravity="center"
android:text="J"
android:textSize="25dp" />
<Button
android:id="#+id/m"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/g"
android:layout_below="#+id/g"
android:gravity="center"
android:text="M"
android:textSize="25dp" />
<Button
android:id="#+id/n"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/m"
android:layout_alignBottom="#+id/m"
android:layout_toRightOf="#+id/m"
android:gravity="center"
android:text="N"
android:textSize="25dp" />
<Button
android:id="#+id/k"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/n"
android:layout_toLeftOf="#+id/f"
android:gravity="center"
android:text="K"
android:textSize="25dp" />
<Button
android:id="#+id/l"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/n"
android:layout_toRightOf="#+id/w"
android:gravity="center"
android:text="L"
android:textSize="25dp" />
<Button
android:id="#+id/o"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/n"
android:layout_alignBottom="#+id/n"
android:layout_toRightOf="#+id/n"
android:gravity="center"
android:text="O"
android:textSize="25dp" />
<Button
android:id="#+id/s"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/m"
android:layout_below="#+id/m"
android:gravity="center"
android:text="S"
android:textSize="25dp" />
<Button
android:id="#+id/t"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/n"
android:layout_toLeftOf="#+id/o"
android:gravity="center"
android:text="T"
android:textSize="25dp" />
<Button
android:id="#+id/p"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/t"
android:layout_toRightOf="#+id/o"
android:gravity="center"
android:text="P"
android:textSize="25dp" />
<Button
android:id="#+id/r"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/t"
android:layout_alignLeft="#+id/l"
android:gravity="center"
android:text="R"
android:textSize="25dp" />
<Button
android:id="#+id/u"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/z"
android:layout_alignLeft="#+id/o"
android:gravity="center"
android:text="U"
android:textSize="25dp" />
<Button
android:id="#+id/v"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/p"
android:layout_toLeftOf="#+id/q"
android:gravity="center"
android:text="V"
android:textSize="25dp" />
<Button
android:id="#+id/w"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/p"
android:layout_toLeftOf="#+id/f"
android:gravity="center"
android:text="W"
android:textSize="25dp" />
<Button
android:id="#+id/q"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/k"
android:layout_toRightOf="#+id/p"
android:gravity="center"
android:text="Q"
android:textSize="25dp" />
<Button
android:id="#+id/x"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/z"
android:layout_toRightOf="#+id/q"
android:gravity="center"
android:text="X"
android:textSize="25dp" />
<Button
android:id="#+id/z"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/v"
android:layout_toLeftOf="#+id/q"
android:gravity="center"
android:text="Z"
android:textSize="25dp" />
<Button
android:id="#+id/f"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/e"
android:layout_alignBottom="#+id/e"
android:layout_toRightOf="#+id/e"
android:gravity="center"
android:text="F"
android:textSize="25dp" />
<Button
android:id="#+id/y"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/z"
android:layout_alignBottom="#+id/z"
android:layout_toLeftOf="#+id/z"
android:gravity="center"
android:text="Y"
android:textSize="25dp" />
<TextView
android:id="#+id/six"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/five"
android:layout_alignBottom="#+id/five"
android:layout_alignRight="#+id/d"
android:text=""
android:textColor="#B40404"
android:textSize="30sp" />
<TextView
android:id="#+id/five"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/four"
android:layout_alignBottom="#+id/four"
android:layout_toRightOf="#+id/c"
android:text=""
android:textColor="#B40404"
android:textSize="30sp" />
<TextView
android:id="#+id/four"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/three"
android:layout_alignBottom="#+id/three"
android:layout_alignLeft="#+id/c"
android:layout_marginLeft="14dp"
android:text=""
android:textColor="#B40404"
android:textSize="30sp" />
<TextView
android:id="#+id/three"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/two"
android:layout_alignBottom="#+id/two"
android:layout_alignRight="#+id/b"
android:text=""
android:textColor="#B40404"
android:textSize="30sp" />
<TextView
android:id="#+id/two"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/one"
android:layout_alignBottom="#+id/one"
android:layout_toRightOf="#+id/a"
android:text=""
android:textColor="#B40404"
android:textSize="30sp" />
<TextView
android:id="#+id/seven"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/six"
android:layout_alignBottom="#+id/six"
android:layout_alignRight="#+id/e"
android:layout_marginRight="15dp"
android:text=""
android:textColor="#B40404"
android:textSize="30sp" />
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/three"
android:layout_alignParentLeft="true"
android:text="Chances:"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/a"
android:layout_alignParentLeft="true"
android:layout_marginLeft="14dp"
android:text=""
android:textColor="#B40404"
android:textSize="30sp" />
<TextView
android:id="#+id/nine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/f"
android:layout_alignRight="#+id/f"
android:text=""
android:textColor="#B40404"
android:textSize="30sp" />
<TextView
android:id="#+id/eight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/seven"
android:layout_alignBottom="#+id/seven"
android:layout_toRightOf="#+id/seven"
android:text=""
android:textColor="#B40404"
android:textSize="30sp" />
<Button
android:id="#+id/a"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:gravity="center"
android:text="A"
android:textSize="25dp" />
<Button
android:id="#+id/g"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/b"
android:layout_toLeftOf="#+id/h"
android:gravity="center"
android:text="G"
android:textSize="25dp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:orientation="horizontal" >
<ImageView
android:id="#+id/imgI"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignTop="#+id/imgD"
android:layout_centerHorizontal="true"
android:src="#drawable/i" />
<ImageView
android:id="#+id/imgL"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignTop="#+id/imgI"
android:layout_toRightOf="#+id/imgI"
android:src="#drawable/l" />
<ImageView
android:id="#+id/imgD"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentTop="true"
android:layout_marginTop="115dp"
android:layout_toLeftOf="#+id/imgI"
android:src="#drawable/d" />
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/imgD"
android:layout_alignRight="#+id/imgL"
android:layout_below="#+id/imgI"
android:text=" ___ ___ ___"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/tCoins"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/ImageView01"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imgL"
android:text=" "
android:textColor="#B40404"
android:textSize="25dp" />
<ImageView
android:id="#+id/ImageView01"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentTop="true"
android:layout_toLeftOf="#+id/tCoins"
android:src="#drawable/coins" />
</RelativeLayout>

To set your theme:
setTheme(android.R.style.Theme_Translucent_NoTitleBar); // Example theme;
Holo - Theme_Holo_NoTitleBar
You must call it before:
setContentView(...);
Or add this to your manifest:
android:theme="#android:style/Theme.Holo.NoActionBar.Fullscreen"
You can remove NoActionBar, and Fullscreen, to get different things. Also you can add stuff. If you do it with code, there is autocomplete and you can see all themes and options.
Hope this helps.

The first one uses the holo theme. The second devices uses the pre holo theme.

Just use your custom theme, so you can have a "standard" theme across any Android version. http://developer.android.com/guide/topics/ui/themes.html

Related

I can't get ScrollView to work with Relative layout

I was trying to find a way to scroll my Relative Layout while I'm in designer in Intellij, since I can't see all the elements I want and position them right. I researched and read numerous threads and the advice I saw most was "wrap the layout you want to scroll in ScrollView", which I did, but that didn't help me. I still can't see all of my widgets and when I put them near the end of the screen, they either shrink or get positioned below - where I can't see them and manage them. I'm new to all this, so I guess I must be doing something wrong.
I apologize in advance if the answer to this question already exists, I couldn't find it
Here's my XML :
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/ScrollView02"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:nestedScrollingEnabled="true"
android:scrollIndicators="right"
tools:scrollY="150px" android:addStatesFromChildren="true" android:isScrollContainer="true"
android:scrollbarAlwaysDrawHorizontalTrack="false" android:scrollY="300dp">
<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="wrap_content"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
android:paddingBottom="#dimen/activity_vertical_margin"
>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/imageButton3"
android:layout_alignParentTop="true" android:layout_alignParentStart="false"
android:layout_alignParentEnd="true" android:background="#drawable/abc_ic_menu_overflow_material"
android:clickable="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TITLE"
android:id="#+id/textView7" android:layout_below="#+id/imageButton3"
android:layout_centerHorizontal="true" android:textSize="25dp" android:textStyle="bold"/>
<Spinner
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/spinner"
android:layout_marginLeft="20dp" android:layout_marginRight="20dp"
android:layout_above="#+id/textView9" android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp"/>
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/seekBar"
android:layout_alignBottom="#+id/weight_button" android:layout_toEndOf="#+id/weight_button"
android:layout_marginBottom="12dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="First"
android:id="#+id/textView9"
android:layout_above="#+id/textView10" android:layout_alignStart="#+id/spinner"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="< >"
android:id="#+id/textView10"
android:textStyle="bold"
android:textSize="20dp"
android:layout_above="#+id/seekBar" android:layout_toStartOf="#+id/imageButton3"/>
<Button
android:layout_width="50dp"
android:layout_height="50dp"
android:id="#+id/weight_button"
android:text="80"
android:allowUndo="true"
android:background="#drawable/round_button_weight"
android:layout_marginLeft="5dp" android:textColor="#android:color/white"
android:layout_above="#+id/textView11" android:layout_alignStart="#+id/textView9"
android:layout_marginBottom="17dp"/>
<LinearLayout android:orientation="horizontal" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/weight_button"
android:layout_alignEnd="#+id/imageButton3" android:id="#+id/linearLayout2"
android:layout_marginTop="10dp" android:layout_alignLeft="#+id/weight_button">
</LinearLayout>
<TextView android:layout_width="match_parent" android:layout_height="1dp" android:id="#+id/textView11"
android:background="#555252" android:layout_weight="1" android:layout_gravity="center_vertical"
android:layout_alignParentStart="true" android:layout_marginBottom="10dp"
android:layout_above="#+id/textView12"/>
<SeekBar android:layout_width="match_parent" android:layout_height="wrap_content" android:id="#+id/seekBar2"
android:layout_centerVertical="true" android:layout_toEndOf="#+id/button"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Second"
android:id="#+id/textView12"
android:layout_above="#+id/button" android:layout_alignStart="#+id/textView9"
android:layout_marginBottom="5dp" android:layout_marginTop="10dp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="< >"
android:id="#+id/textView13" android:textStyle="bold" android:textSize="20dp"
android:layout_below="#+id/textView12" android:layout_alignEnd="#+id/spinner"/>
<Button android:layout_width="50dp" android:layout_height="50dp" android:id="#+id/button" android:text="175"
android:allowUndo="true" android:background="#drawable/round_button_height"
android:textColor="#android:color/white"
android:layout_centerVertical="true" android:layout_toStartOf="#+id/seekBar"/>
<TextView android:layout_width="match_parent" android:layout_height="1dp" android:id="#+id/textView14"
android:background="#555252" android:layout_weight="1" android:layout_gravity="center_vertical"
android:layout_below="#+id/button" android:layout_alignLeft="#+id/textView11"
android:layout_marginTop="10dp" android:layout_marginBottom="5dp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Third"
android:id="#+id/textView15"
android:layout_below="#+id/textView14" android:layout_alignStart="#+id/button2"
android:layout_marginBottom="5dp" android:layout_marginTop="10dp"/>
<Button android:layout_width="50dp" android:layout_height="50dp" android:id="#+id/button2" android:text="24"
android:allowUndo="true" android:background="#drawable/round_button_height"
android:textColor="#android:color/white"
android:layout_alignTop="#+id/textView16" android:layout_toStartOf="#+id/seekBar3"
android:layout_marginBottom="20dp"/>
<SeekBar android:layout_width="match_parent" android:layout_height="wrap_content" android:id="#+id/seekBar3"
android:layout_alignBottom="#+id/button2" android:layout_alignStart="#+id/seekBar2"
android:layout_marginBottom="12dp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="< >"
android:id="#+id/textView16" android:textStyle="bold" android:textSize="20dp"
android:layout_below="#+id/textView15"
android:layout_alignRight="#+id/textView10" android:layout_alignLeft="#+id/textView10"/>
<TextView android:layout_width="match_parent" android:layout_height="1dp" android:id="#+id/textView17"
android:background="#555252" android:layout_weight="1" android:layout_gravity="center_vertical"
android:layout_below="#+id/button2"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0-6"
android:id="#+id/radioButton1"
android:layout_marginTop="37dp" android:checked="false"
android:layout_below="#+id/textView17" android:layout_alignEnd="#+id/textView9"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="6-18"
android:id="#+id/radioButton2"
android:checked="false"
android:layout_alignTop="#+id/radioButton3" android:layout_centerHorizontal="true"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=">18"
android:id="#+id/radioButton3"
android:checked="false"
android:layout_alignTop="#+id/radioButton1" android:layout_alignEnd="#+id/textView16"
android:layout_marginEnd="26dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Title1"
android:id="#+id/textView18"
android:textStyle="bold"
android:textSize="15dp" android:layout_above="#+id/radioButton2" android:layout_alignParentStart="false"
android:padding="10dp" android:textAllCaps="true" android:textColor="#android:color/white"
android:background="#3b3c50" android:layout_marginTop="20dp" android:layout_marginBottom="10dp"/>
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
android:text="Title2" android:id="#+id/textView19"
android:textStyle="bold"
android:textSize="15dp" android:layout_below="#+id/radioButton1"
android:layout_alignStart="#+id/textView18" android:layout_marginTop="10dp"
android:layout_marginBottom="10dp" android:padding="10dp" android:textAllCaps="true"
android:textColor="#android:color/white" android:background="#3b3c50"/>
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="1"
android:id="#+id/radioButton" android:checked="false"
android:layout_below="#+id/textView19" android:layout_alignStart="#+id/radioButton1"/>
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2"
android:id="#+id/radioButton4" android:checked="false"
android:layout_below="#+id/textView19" android:layout_alignEnd="#+id/textView7"/>
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="3"
android:id="#+id/radioButton5" android:checked="false"
android:layout_alignTop="#+id/radioButton4" android:layout_alignEnd="#+id/textView13"/>
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Title 3"
android:id="#+id/textView20" android:textStyle="bold" android:textSize="15dp"
android:layout_below="#+id/radioButton" android:layout_alignStart="#+id/textView19"
android:layout_marginTop="10dp" android:layout_marginBottom="10dp"
android:textColor="#android:color/white" android:background="#3b3c50" android:textAllCaps="true"
android:padding="10dp"/>
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="1"
android:id="#+id/radioButton6" android:checked="false"
android:layout_below="#+id/textView20" android:layout_alignStart="#+id/radioButton"/>
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2"
android:id="#+id/radioButton7" android:checked="false"
android:layout_alignTop="#+id/radioButton6" android:layout_alignStart="#+id/radioButton4"/>
<RadioButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="3"
android:id="#+id/radioButton8" android:checked="false"
android:layout_alignTop="#+id/radioButton7" android:layout_alignStart="#+id/radioButton5"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Title4"
android:id="#+id/textView21" android:textStyle="bold" android:textSize="15dp"
android:layout_below="#+id/radioButton8" android:layout_alignStart="#+id/textView20"
android:layout_marginTop="10dp" android:layout_marginBottom="10dp"/>
</RelativeLayout>
</ScrollView>
You can add LinearLayout under ScrollView and then put RelativeLayout under LinearLayout.
Try this i have edited your layout file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/ScrollView02"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:addStatesFromChildren="true"
android:fillViewport="true"
android:isScrollContainer="true"
android:nestedScrollingEnabled="true"
android:scrollIndicators="right"
android:scrollbarAlwaysDrawHorizontalTrack="false"
tools:scrollY="150px">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin">
<ImageButton
android:id="#+id/imageButton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:background="#drawable/abc_ic_menu_overflow_material"
android:clickable="true" />
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/imageButton3"
android:layout_centerHorizontal="true"
android:text="TITLE"
android:textSize="25dp"
android:textStyle="bold" />
<Spinner
android:id="#+id/spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/textView9"
android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp" />
<SeekBar
android:id="#+id/seekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/weight_button"
android:layout_marginBottom="12dp"
android:layout_toRightOf="#+id/weight_button"
android:layout_toEndOf="#+id/weight_button" />
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/textView10"
android:layout_alignLeft="#+id/spinner"
android:layout_alignStart="#+id/spinner"
android:text="First" />
<TextView
android:id="#+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/seekBar"
android:layout_toLeftOf="#+id/imageButton3"
android:layout_toStartOf="#+id/imageButton3"
android:text="< >"
android:textSize="20dp"
android:textStyle="bold" />
<Button
android:id="#+id/weight_button"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_above="#+id/textView11"
android:layout_alignLeft="#+id/textView9"
android:layout_alignStart="#+id/textView9"
android:layout_marginBottom="17dp"
android:layout_marginLeft="5dp"
android:allowUndo="true"
android:background="#drawable/round_button_weight"
android:text="80"
android:textColor="#android:color/white" />
<LinearLayout
android:id="#+id/linearLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/imageButton3"
android:layout_alignRight="#+id/imageButton3"
android:layout_alignLeft="#+id/weight_button"
android:layout_below="#+id/weight_button"
android:layout_marginTop="10dp"
android:orientation="horizontal"></LinearLayout>
<TextView
android:id="#+id/textView11"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_above="#+id/textView12"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_gravity="center_vertical"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:background="#555252" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="#+id/button"
android:layout_toRightOf="#+id/button" />
<TextView
android:id="#+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/button"
android:layout_alignStart="#+id/textView9"
android:layout_alignLeft="#+id/textView9"
android:layout_marginBottom="5dp"
android:layout_marginTop="10dp"
android:text="Second" />
<TextView
android:id="#+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/spinner"
android:layout_alignRight="#+id/spinner"
android:layout_below="#+id/textView12"
android:text="< >"
android:textSize="20dp"
android:textStyle="bold" />
<Button
android:id="#+id/button"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerVertical="true"
android:layout_toStartOf="#+id/seekBar"
android:layout_toLeftOf="#+id/seekBar"
android:allowUndo="true"
android:background="#drawable/round_button_height"
android:text="175"
android:textColor="#android:color/white" />
<TextView
android:id="#+id/textView14"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignLeft="#+id/textView11"
android:layout_below="#+id/button"
android:layout_gravity="center_vertical"
android:layout_marginBottom="5dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:background="#555252" />
<TextView
android:id="#+id/textView15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/button2"
android:layout_alignLeft="#+id/button2"
android:layout_below="#+id/textView14"
android:layout_marginBottom="5dp"
android:layout_marginTop="10dp"
android:text="Third" />
<Button
android:id="#+id/button2"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignTop="#+id/textView16"
android:layout_marginBottom="20dp"
android:layout_toStartOf="#+id/seekBar3"
android:layout_toLeftOf="#+id/seekBar3"
android:allowUndo="true"
android:background="#drawable/round_button_height"
android:text="24"
android:textColor="#android:color/white" />
<SeekBar
android:id="#+id/seekBar3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/button2"
android:layout_alignStart="#+id/seekBar2"
android:layout_alignLeft="#+id/seekBar2"
android:layout_marginBottom="12dp" />
<TextView
android:id="#+id/textView16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView10"
android:layout_alignRight="#+id/textView10"
android:layout_below="#+id/textView15"
android:text="< >"
android:textSize="20dp"
android:textStyle="bold" />
<TextView
android:id="#+id/textView17"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#+id/button2"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:background="#555252" />
<RadioButton
android:id="#+id/radioButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/textView9"
android:layout_alignRight="#+id/textView9"
android:layout_below="#+id/textView17"
android:layout_marginTop="37dp"
android:checked="false"
android:text="0-6" />
<RadioButton
android:id="#+id/radioButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/radioButton3"
android:layout_centerHorizontal="true"
android:checked="false"
android:text="6-18" />
<RadioButton
android:id="#+id/radioButton3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/textView16"
android:layout_alignRight="#+id/textView16"
android:layout_alignTop="#+id/radioButton1"
android:layout_marginEnd="26dp"
android:layout_marginRight="26dp"
android:checked="false"
android:text=">18" />
<TextView
android:id="#+id/textView18"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/radioButton2"
android:layout_alignParentStart="false"
android:layout_alignParentLeft="false"
android:layout_marginBottom="10dp"
android:layout_marginTop="20dp"
android:background="#3b3c50"
android:padding="10dp"
android:text="Title1"
android:textAllCaps="true"
android:textColor="#android:color/white"
android:textSize="15dp"
android:textStyle="bold" />
<TextView
android:id="#+id/textView19"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/textView18"
android:layout_alignLeft="#+id/textView18"
android:layout_below="#+id/radioButton1"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:background="#3b3c50"
android:padding="10dp"
android:text="Title2"
android:textAllCaps="true"
android:textColor="#android:color/white"
android:textSize="15dp"
android:textStyle="bold" />
<RadioButton
android:id="#+id/radioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/radioButton1"
android:layout_alignLeft="#+id/radioButton1"
android:layout_below="#+id/textView19"
android:checked="false"
android:text="1" />
<RadioButton
android:id="#+id/radioButton4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/textView7"
android:layout_alignRight="#+id/textView7"
android:layout_below="#+id/textView19"
android:checked="false"
android:text="2" />
<RadioButton
android:id="#+id/radioButton5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="#+id/textView13"
android:layout_alignRight="#+id/textView13"
android:layout_alignTop="#+id/radioButton4"
android:checked="false"
android:text="3" />
<TextView
android:id="#+id/textView20"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/textView19"
android:layout_alignLeft="#+id/textView19"
android:layout_below="#+id/radioButton"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:background="#3b3c50"
android:padding="10dp"
android:text="Title 3"
android:textAllCaps="true"
android:textColor="#android:color/white"
android:textSize="15dp"
android:textStyle="bold" />
<RadioButton
android:id="#+id/radioButton6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/radioButton"
android:layout_alignLeft="#+id/radioButton"
android:layout_below="#+id/textView20"
android:checked="false"
android:text="1" />
<RadioButton
android:id="#+id/radioButton7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/radioButton4"
android:layout_alignLeft="#+id/radioButton4"
android:layout_alignTop="#+id/radioButton6"
android:checked="false"
android:text="2" />
<RadioButton
android:id="#+id/radioButton8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/radioButton5"
android:layout_alignLeft="#+id/radioButton5"
android:layout_alignTop="#+id/radioButton7"
android:checked="false"
android:text="3" />
<TextView
android:id="#+id/textView21"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/textView20"
android:layout_alignLeft="#+id/textView20"
android:layout_below="#+id/radioButton8"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:text="Title4"
android:textSize="15dp"
android:textStyle="bold" />
</RelativeLayout>
Thank you for your suggestions, but neither of them did help. After I updated IntelliJ to 3.x version, it worked, without changing the code.

How do I stop scrollview from scrolling to the top after a button is clicked?

I am working on my first app and have it working pretty much as I would like with one small exception. The problem is in the scrollview with a relative layout that contains up to 20 buttons. When I scroll down and click on a button near the bottom the scrollview it scrolls back to the top after the click. I want the scrollview to stay where it is after a click. For example after clicking button 18 I don't want the user to have to scroll back down to the bottom to click button 19. Can someone tell me how to stop the scrollview from automatically scrolling to the top after a click.
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/timerScrollView"
android:layout_below="#+id/startStopBtn"
android:layout_alignParentEnd="true"
android:layout_marginTop="10dp" >
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin" >
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner1Btn"
android:layout_marginTop="5dp"
android:layout_below="#+id/startStopBtn"
android:layout_alignParentStart="true"
android:layout_marginLeft="0dp"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:visibility="gone" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner1TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner1Btn"
android:visibility="gone"
android:layout_alignParentEnd="true" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner2Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:isScrollContainer="true"
android:keepScreenOn="true"
android:layout_centerVertical="true"
android:layout_alignStart="#+id/runner1Btn"
android:layout_marginTop="15dp"
android:layout_below="#+id/runner1Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner3Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_centerVertical="true"
android:layout_alignParentStart="false"
android:layout_below="#+id/runner2Btn"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner4Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner3Btn"
android:layout_alignParentStart="false"
android:isScrollContainer="false"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner5Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner4Btn"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner6Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner5Btn"
android:layout_alignStart="#id/runner1Btn"
android:layout_marginTop="15dp"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner7Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner6Btn"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner8Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:isScrollContainer="true"
android:keepScreenOn="true"
android:layout_centerVertical="true"
android:layout_alignStart="#+id/runner1Btn"
android:layout_marginTop="15dp"
android:layout_below="#+id/runner7Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner9Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_centerVertical="true"
android:layout_alignParentStart="false"
android:layout_below="#+id/runner8Btn"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner10Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner9Btn"
android:layout_alignParentStart="false"
android:isScrollContainer="false"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner11Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner10Btn"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner12Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner11Btn"
android:layout_alignStart="#id/runner1Btn"
android:layout_marginTop="15dp"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner13Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner12Btn"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner14Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner13Btn"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner15Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:isScrollContainer="true"
android:keepScreenOn="true"
android:layout_centerVertical="true"
android:layout_alignStart="#+id/runner1Btn"
android:layout_marginTop="15dp"
android:layout_below="#+id/runner14Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner16Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_centerVertical="true"
android:layout_alignParentStart="false"
android:layout_below="#+id/runner15Btn"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner17Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner16Btn"
android:layout_alignParentStart="false"
android:isScrollContainer="false"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner18Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner17Btn"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone"
android:focusableInTouchMode="false" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner19Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner18Btn"
android:layout_alignStart="#id/runner1Btn"
android:layout_marginTop="15dp"
android:visibility="gone" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="110dp"
android:layout_height="40dp"
android:id="#+id/runner20Btn"
android:background="#101fbd"
android:textColor="#FFFFFFFF"
android:textSize="20dp"
android:layout_below="#+id/runner19Btn"
android:layout_marginTop="15dp"
android:layout_alignStart="#id/runner1Btn"
android:visibility="gone" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner2TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner2Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner3TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner3Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner4TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner4Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner5TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner5Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner6TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner6Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner7TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner7Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner8TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner8Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner9TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner9Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner10TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner10Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner11TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner11Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner12TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner12Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner13TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner13Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner14TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner14Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner15TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner15Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="false" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner16TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner16Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner17TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner17Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner18TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner18Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner19TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner19Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="#+id/runner20TimeView"
android:layout_marginRight="0dp"
android:textColor="#000000"
android:textSize="30dp"
android:textIsSelectable="true"
android:layout_alignBaseline="#+id/runner20Btn"
android:visibility="gone"
android:layout_alignEnd="#id/runner1TimeView"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</ScrollView>
Here is my JAVA code for the OnClickListener for one of the buttons.
runner[18].setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
if (runnerRunning[18]) {
time[18] = System.currentTimeMillis() - startTime;
runners.get(18).setTime(formatTime(time[18]));
runnerTime[18].setText(formatTime(time[18]));
runnerRunning[18] = false;
}
}
});

How to make child TextViews stay in position in Relative Layout?

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" />

Android RelativeLayout doesn't stretch to fill parent's height

Motorolla XOOM, Android 3.2. After my resource preloader(you can see a progressbar of it on the picture below) has finished his work, this window shows up, but it's height is not stretched to fill all screen. How can it be fixed?
Image: http://img441.imageshack.us/img441/1523/device20120319140942.png
Here is my layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/mainMenu"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#drawable/menu_bg" >
<RelativeLayout
android:id="#+id/button_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" >
<Button
android:id="#+id/continue_button"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="#drawable/derp"
android:text="#string/continue_text"
android:textColor="#color/main_red"
android:textSize="30dp"
android:textStyle="bold" />
<Button
android:id="#+id/play"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_below="#id/continue_button"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:background="#drawable/derp"
android:text="#string/playGame"
android:textColor="#color/main_blue"
android:textSize="30dp"
android:textStyle="bold" />
<Button
android:id="#+id/leaderboard"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_below="#id/play"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:background="#drawable/derp"
android:text="#string/leaderboard"
android:textColor="#color/main_blue"
android:textSize="30dp"
android:textStyle="bold" />
<Button
android:id="#+id/settings"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_below="#id/leaderboard"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:background="#drawable/derp"
android:text="#string/settings"
android:textColor="#color/main_blue"
android:textSize="30dp"
android:textStyle="bold" />
<Button
android:id="#+id/exit"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_below="#id/settings"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:background="#drawable/derp"
android:text="#string/closeGame"
android:textColor="#color/main_blue"
android:textSize="30dp"
android:textStyle="bold" />
</RelativeLayout>
<TextView
android:id="#+id/nickname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#id/button_layout"
android:text="TextView"
android:layout_marginBottom="30dp"
android:layout_centerHorizontal="true"
android:textColor="#color/main_red"
android:textSize="20dp" />
<TextView
android:id="#+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="#id/button_layout"
android:layout_marginTop="50dp"
android:text="TextView"
android:textColor="#color/main_blue"
android:textSize="14dp" />
</RelativeLayout>
Try with this code
<RelativeLayout
android:id="#+id/button_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" >
<Button
android:id="#+id/continue_button"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:background="#drawable/derp"
android:text="#string/continue_text"
android:textColor="#ff0000"
android:textSize="30dp"
android:textStyle="bold" />
<Button
android:id="#+id/play"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_below="#id/continue_button"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:background="#drawable/derp"
android:text="#string/playGame"
android:textColor="#ff0000"
android:textSize="30dp"
android:textStyle="bold" />
<Button
android:id="#+id/leaderboard"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_below="#id/play"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:background="#drawable/derp"
android:text="#string/leaderboard"
android:textColor="#ff0000"
android:textSize="30dp"
android:textStyle="bold" />
<Button
android:id="#+id/settings"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_below="#id/leaderboard"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:background="#drawable/derp"
android:text="#string/settings"
android:textColor="#ff0000"
android:textSize="30dp"
android:textStyle="bold" />
<Button
android:id="#+id/exit"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_below="#id/settings"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:background="#drawable/derp"
android:text="#string/closeGame"
android:textColor="#ff0000"
android:textSize="30dp"
android:textStyle="bold" />
</RelativeLayout>
<TextView
android:id="#+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="#id/button_layout"
android:layout_marginTop="50dp"
android:text="TextView"
android:textColor="#ff0000"
android:textSize="14dp" />
this code working for me
If this is also not working you have to use weight concept
Correct code check this xml file linearlayout missing in the top entry
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/mainMenu" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="#drawable/add_pic">
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical"
android:layout_centerInParent="true" android:gravity="center">
<TextView android:id="#+id/nickname" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_above="#id/button_layout"
android:text="TextView" android:layout_marginBottom="30dp"
android:layout_centerHorizontal="true" android:textColor="#ff0000"
android:textSize="20dp" />
<RelativeLayout android:id="#+id/button_layout"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true">
<Button android:id="#+id/continue_button"
android:layout_width="wrap_content" android:layout_height="40dp"
android:layout_centerHorizontal="true" android:background="#drawable/derp"
android:text="#string/continue_text" android:textColor="#ff0000"
android:textSize="30dp" android:textStyle="bold" />
<Button android:id="#+id/play" android:layout_width="wrap_content"
android:layout_height="40dp" android:layout_below="#id/continue_button"
android:layout_centerHorizontal="true" android:layout_marginTop="10dp"
android:background="#drawable/derp" android:text="#string/playGame"
android:textColor="#ff0000" android:textSize="30dp"
android:textStyle="bold" />
<Button android:id="#+id/leaderboard" android:layout_width="wrap_content"
android:layout_height="40dp" android:layout_below="#id/play"
android:layout_centerHorizontal="true" android:layout_marginTop="10dp"
android:background="#drawable/derp" android:text="#string/leaderboard"
android:textColor="#ff0000" android:textSize="30dp"
android:textStyle="bold" />
<Button android:id="#+id/settings" android:layout_width="wrap_content"
android:layout_height="40dp" android:layout_below="#id/leaderboard"
android:layout_centerHorizontal="true" android:layout_marginTop="10dp"
android:background="#drawable/derp" android:text="#string/settings"
android:textColor="#ff0000" android:textSize="30dp"
android:textStyle="bold" />
<Button android:id="#+id/exit" android:layout_width="wrap_content"
android:layout_height="40dp" android:layout_below="#id/settings"
android:layout_centerHorizontal="true" android:layout_marginTop="10dp"
android:background="#drawable/derp" android:text="#string/closeGame"
android:textColor="#ff0000" android:textSize="30dp"
android:textStyle="bold" />
</RelativeLayout>
<TextView android:id="#+id/version" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_centerHorizontal="true"
android:layout_below="#id/button_layout" android:layout_marginTop="50dp"
android:text="TextView" android:textColor="#ff0000" android:textSize="14dp" />
</LinearLayout>
</RelativeLayout>

Footer view missing in android RelativeLayout

I am using header and footer and also use scroll view in within content part only.
if i run that application in emulator it display header and content part only. Footer view is missing in my application.
Here my code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:id="#+id/rl_header"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:background="#drawable/head" >
<TextView android:id="#+id/txtTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="#string/gebrauchte"
android:textColor="#fff"
android:textStyle="bold"
android:textSize="20dp"/> </RelativeLayout>
<ScrollView
android:id="#+id/scrollView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/rl_header"
>
<RelativeLayout
android:id="#+id/ll_bikeDetail"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#fff" >
<RelativeLayout
android:id="#+id/rl_bikeDetail"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#fff" >
<TextView
android:id="#+id/txtDetail"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginLeft="8dp"
android:text="#string/detail"
android:textColor="#000"
android:textSize="15dp"
android:textStyle="bold" android:layout_marginTop="5dp"/>
<TextView
android:id="#+id/txtDetail1"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginLeft="130dp"
android:text="#string/pass"
android:textColor="#000"
android:textSize="13dp" android:layout_marginTop="5dp"/>
<TextView
android:id="#+id/txtDynamic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="267dp"
android:text="2175"
android:textStyle="bold" android:layout_marginTop="5dp"/>
<View
android:id="#+id/img_hrDetail"
android:layout_width="wrap_content"
android:layout_height="2dp"
android:layout_below="#+id/txtDetail"
android:background="#FF909090" />
<TextView
android:id="#+id/txtBikeType"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/img_hrDetail"
android:layout_marginLeft="8dp"
android:text="#string/biketype"
android:textColor="#000"
android:textSize="15dp"
android:textStyle="bold" android:layout_marginTop="5dp"/>
<TextView
android:id="#+id/txtBike"
android:layout_width="wrap_content"
android:layout_height="23dp"
android:layout_below="#+id/img_hrDetail"
android:layout_marginLeft="110dp"
android:text="#string/belie"
android:textColor="#ff0000"
android:textSize="15dp" android:layout_marginTop="5dp"/>
<Button
android:id="#+id/btn_arwBikeType"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="#+id/img_hrDetail"
android:layout_marginLeft="280dp"
android:background="#drawable/arrow" android:layout_marginTop="5dp"/>
<View
android:id="#+id/img_hrBikeType"
android:layout_width="wrap_content"
android:layout_height="2dp"
android:layout_below="#+id/txtBikeType"
android:background="#FF909090" />
<TextView
android:id="#+id/txtMarke"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/img_hrBikeType"
android:layout_marginLeft="8dp"
android:text="#string/mark"
android:textColor="#000"
android:textSize="15dp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtMarkeBe"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/img_hrBikeType"
android:layout_marginLeft="110dp"
android:text="#string/belie"
android:textColor="#ff0000"
android:textSize="15dp" />
<Button
android:id="#+id/btn_arwBrand"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="#+id/img_hrBikeType"
android:layout_marginLeft="280dp"
android:background="#drawable/arrow" />
<TextView
android:id="#+id/txtModel"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/txtMarke"
android:layout_marginLeft="8dp"
android:text="#string/model"
android:textColor="#000"
android:textSize="15dp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtModelBe"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#id/txtMarke"
android:layout_marginLeft="110dp"
android:text="#string/belie"
android:textColor="#ff0000"
android:textSize="15dp" />
<Button
android:id="#+id/btn_arwModel"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="#+id/txtMarke"
android:layout_marginLeft="280dp"
android:background="#drawable/arrow" />
<View
android:id="#+id/img_hrModel"
android:layout_width="wrap_content"
android:layout_height="2dp"
android:layout_below="#+id/txtModel"
android:background="#FF909090" />
<TextView
android:id="#+id/txtErst"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/img_hrModel"
android:layout_marginLeft="8dp"
android:text="#string/erst"
android:textColor="#000"
android:textSize="15dp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtErstBe"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/img_hrModel"
android:layout_marginLeft="115dp"
android:layout_marginTop="3dp"
android:text="#string/belie"
android:textColor="#ff0000"
android:textSize="13dp" />
<Button
android:id="#+id/btn_arwErstBe"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="#+id/img_hrModel"
android:layout_marginLeft="170dp"
android:background="#drawable/arrow"/>
<TextView
android:id="#+id/txtErstBis"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/img_hrModel"
android:layout_marginLeft="200dp"
android:layout_marginTop="5dp"
android:text="#string/bis"
android:textColor="#000"
android:textSize="13dp" />
<TextView
android:id="#+id/txtErstBel"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/img_hrModel"
android:layout_marginLeft="220dp"
android:layout_marginTop="5dp"
android:text="#string/belie"
android:textColor="#ff0000"
android:textSize="13dp" />
<Button
android:id="#+id/btn_arwErst"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="#+id/img_hrModel"
android:layout_marginLeft="280dp"
android:background="#drawable/arrow" />
<TextView
android:id="#+id/txtLauf"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/txtErst"
android:layout_marginLeft="8dp"
android:text="#string/lauf"
android:textColor="#000"
android:textSize="15dp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtLaufKm"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#id/txtErst"
android:layout_marginLeft="115dp"
android:layout_marginTop="3dp"
android:text="#string/km"
android:textColor="#ff0000"
android:textSize="13dp" />
<Button
android:id="#+id/btn_arwLaufBe"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="#+id/txtErst"
android:layout_marginLeft="170dp"
android:background="#drawable/arrow" />
<TextView
android:id="#+id/txtLaufBis"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/txtErst"
android:layout_marginLeft="200dp"
android:layout_marginTop="3dp"
android:text="#string/bis"
android:textColor="#000"
android:textSize="13dp" />
<TextView
android:id="#+id/txtLaufBel"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#id/txtErst"
android:layout_marginLeft="220dp"
android:layout_marginTop="3dp"
android:text="#string/belie"
android:textColor="#ff0000"
android:textSize="13dp" />
<Button
android:id="#+id/btn_arwLauf"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="#+id/txtErst"
android:layout_marginLeft="280dp"
android:background="#drawable/arrow" />
<TextView
android:id="#+id/txtHub"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/txtLauf"
android:layout_marginLeft="8dp"
android:text="#string/hub"
android:textColor="#000"
android:textSize="15dp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtHubCcm"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#id/txtLauf"
android:layout_marginLeft="115dp"
android:layout_marginTop="3dp"
android:text="#string/ccm"
android:textColor="#ff0000"
android:textSize="13dp" />
<Button
android:id="#+id/btn_arwHubCcm"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="#+id/txtLauf"
android:layout_marginLeft="170dp"
android:background="#drawable/arrow" />
<TextView
android:id="#+id/txtHubBis"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/txtLauf"
android:layout_marginLeft="200dp"
android:layout_marginTop="3dp"
android:text="#string/bis"
android:textColor="#000"
android:textSize="13dp" />
<TextView
android:id="#+id/txtHubBel"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#id/txtLauf"
android:layout_marginLeft="220dp"
android:layout_marginTop="3dp"
android:text="#string/belie"
android:textColor="#ff0000"
android:textSize="13dp" />
<Button
android:id="#+id/btn_arwHub"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="#+id/txtLauf"
android:layout_marginLeft="280dp"
android:background="#drawable/arrow" />
<TextView
android:id="#+id/txtPre"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/txtHub"
android:layout_marginLeft="8dp"
android:text="#string/pre"
android:textColor="#000"
android:textSize="15dp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtPreBe"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#id/txtHub"
android:layout_marginLeft="115dp"
android:layout_marginTop="3dp"
android:text="#string/sign"
android:textColor="#ff0000"
android:textSize="13dp" />
<Button
android:id="#+id/btn_arwPreBe"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="#+id/txtHub"
android:layout_marginLeft="170dp"
android:background="#drawable/arrow" />
<TextView
android:id="#+id/txtPreBis"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/txtHub"
android:layout_marginLeft="200dp"
android:layout_marginTop="3dp"
android:text="#string/bis"
android:textColor="#000"
android:textSize="13dp" />
<TextView
android:id="#+id/txtPreBel"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#id/txtHub"
android:layout_marginLeft="220dp"
android:layout_marginTop="3dp"
android:text="#string/belie"
android:textColor="#ff0000"
android:textSize="13dp" />
<Button
android:id="#+id/btn_arwPre"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="#+id/txtHub"
android:layout_marginLeft="280dp"
android:background="#drawable/arrow" />
<View
android:id="#+id/img_hrPre"
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_below="#+id/txtPre"
android:background="#FF909090" />
<ProgressBar
android:id="#+id/progressBar1"
style="?android:attr/progressBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/txtDynamic"
android:layout_alignLeft="#+id/btn_arwBikeType"
android:background="#000" android:layout_marginTop="5dp"/>
</RelativeLayout>
<RelativeLayout
android:id="#+id/rl_Wo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/rl_bikeDetail"
android:background="#fff" >
<TextView
android:id="#+id/txtWo"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/imgHrule3"
android:layout_marginLeft="8dp"
android:text="#string/wo"
android:textColor="#000"
android:textSize="15dp"
android:textStyle="bold"
android:layout_marginTop="5dp"/>
<com.InternetGMBH.ThousandPS.Utilities.SegmentedRadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" android:layout_below="#+id/img_hrPre"
android:layout_marginLeft="100dp"
android:layout_marginRight="15dp" android:id="#+id/segment_text"
android:checkedButton="#+id/btn_egal"> <RadioButton
android:id="#id/btn_egal" android:minWidth="60dip"
android:minHeight="33dip" android:text="Egal"
android:textAppearance="?android:attr/textAppearanceSmall"
android:button="#null" android:gravity="center"
android:textColor="#color/radio_colors" /> <RadioButton
android:id="#+id/btn_gps" android:minWidth="60dip"
android:minHeight="33dip" android:text="Gps"
android:button="#null" android:gravity="center"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#color/radio_colors" /> <RadioButton
android:id="#+id/btn_eingabe" android:minWidth="60dip"
android:minHeight="33dip" android:text="Eingabe"
android:button="#null" android:gravity="center"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#color/radio_colors" />
</com.InternetGMBH.ThousandPS.Utilities.SegmentedRadioGroup>
<!-- <Button
android:id="#+id/btn_egal"
android:layout_width="70dp"
android:layout_height="35dp"
android:layout_below="#+id/img_hrPre"
android:layout_marginLeft="100dp"
android:layout_marginRight="15dp"
android:text="Egal" android:layout_marginTop="5dp" android:background="#drawable/new_01" android:textColor="#fff"/>
-->
<TextView
android:id="#+id/txtland"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/txtWo"
android:layout_marginLeft="8dp"
android:layout_marginTop="5dp"
android:text="#string/land"
android:textColor="#000"
android:textSize="15dp"
android:textStyle="bold" />
<TextView
android:id="#+id/txtGpsStatus"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/txtWo"
android:textStyle="bold"
android:layout_marginTop="3dp"
android:text=""
android:textColor="#000"
android:textSize="15dp"
android:layout_marginLeft="8dp"/>
<TextView
android:id="#+id/txtlandBe"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#id/txtWo"
android:layout_marginLeft="110dp"
android:layout_marginTop="8dp"
android:text="#string/belie"
android:textColor="#ff0000"
android:textSize="13dp" />
<TextView
android:id="#+id/txtGpsValue"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#id/txtWo"
android:layout_marginLeft="110dp"
android:layout_marginTop="3dp"
android:text=""
android:textColor="#ff0000"
android:textSize="13dp" />
<Button
android:id="#+id/btn_arwLand"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="#+id/txtWo"
android:layout_marginLeft="180dp"
android:background="#drawable/arrow" android:layout_marginTop="5dp"/>
<EditText
android:id="#+id/txt_plz"
android:layout_width="50dp"
android:layout_height="30dp"
android:layout_below="#+id/txtWo"
android:layout_marginLeft="230dp"
android:layout_marginRight="15dp"
android:textSize="10dp" android:layout_marginTop="5dp"/>
<TextView
android:id="#+id/txtmax"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/txtland"
android:layout_marginLeft="8dp"
android:layout_marginTop="3dp"
android:text="#string/max"
android:textColor="#000"
android:textSize="10dp" />
<TextView
android:id="#+id/txtmaxKm"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_below="#+id/txtland"
android:layout_marginLeft="110dp"
android:layout_marginTop="3dp"
android:text="200 km"
android:textColor="#ff0000"
android:textSize="13dp" />
<SeekBar
android:id="#+id/seekBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/btn_arwLand"
android:layout_alignRight="#+id/txt_plz"
android:layout_below="#+id/txtlandBe"
android:max="490" />
</RelativeLayout> </RelativeLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/rl_footer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/scrollView"
android:background="#fff" >
<Button
android:id="#+id/btn_resetForm"
android:layout_width="120dp"
android:layout_height="30dp"
android:layout_alignParentLeft="true"
android:layout_below="#+id/rl_Wo"
android:layout_marginLeft="14dp"
android:layout_marginTop="20dp"
android:background="#drawable/resetform" />
<Button
android:id="#+id/btn_anze"
android:layout_width="120dp"
android:layout_height="30dp"
android:layout_below="#+id/rl_Wo"
android:layout_marginLeft="56dp"
android:layout_marginTop="20dp"
android:layout_toRightOf="#+id/btn_resetForm"
android:background="#drawable/redbutton"
android:text="Anzeigen"
android:textColor="#fff" /> </RelativeLayout>
</RelativeLayout>
any one can help me what's the issue here?
Here my answer,
in footer relative layout just add android:layout_alignParentBottom="true"
<RelativeLayout
android:id="#+id/rl_footer"
android:layout_width="fill_parent"
android:layout_height="46dp"
android:layout_alignParentBottom="true"
android:background="#fff" >
<Button....../>
<Button...../>
</RelativeLayout>

Categories

Resources