Android Scrollview Automatically scrolling up - android

I have a layout with a scrollview and a relative layout inside of the scrollview. I have toggle buttons radio groups and edittext inside this scrollview. The issue I am having is that when I start scrolling down and selecting the toggle buttons, after selection the screen scrolls up automatically to the top. Why is this happening?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#layout/grad_col_bk"
android:orientation="vertical" >
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.91"
android:background="#color/darker_grey" >
<RelativeLayout
android:id="#+id/main_rel_search_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ToggleButton
android:id="#+id/salinityToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:textOff="Salinity"
android:textOn="Salinity " />
<RadioGroup
android:id="#+id/radgroupsal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/salinityToggleButton"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/salGreat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedSalinityGreater"
android:text="Greater Than" />
<RadioButton
android:id="#+id/salLess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedSalinityLess"
android:text="Less Than" />
</RadioGroup>
<View
android:id="#+id/salabove"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/radgroupsal"
android:background="#android:color/white" />
<EditText
android:id="#+id/salinityValue"
android:layout_width="150dp"
android:layout_height="30dp"
android:layout_alignBaseline="#+id/salinityToggleButton"
android:layout_alignBottom="#+id/salinityToggleButton"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:background="#color/white"
android:ems="10"
android:inputType="numberDecimal" >
</EditText>
<ToggleButton
android:id="#+id/AmmoniaToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/salabove"
android:textOff="Ammonia"
android:textOn="Ammonia " />
<EditText
android:id="#+id/ammoniaSearchNumber"
android:layout_width="150dp"
android:layout_height="30dp"
android:layout_alignBaseline="#+id/AmmoniaToggleButton"
android:layout_alignBottom="#+id/AmmoniaToggleButton"
android:layout_alignRight="#+id/salinityValue"
android:background="#android:color/white"
android:ems="10"
android:inputType="numberDecimal"
android:paddingLeft="8dp" >
</EditText>
<RadioGroup
android:id="#+id/radgroupamm"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/AmmoniaToggleButton"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/ammGreat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedAmmoniaGreater"
android:text="Greater Than" />
<RadioButton
android:id="#+id/ammLess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedAmmoniaLess"
android:text="Less Than" />
</RadioGroup>
<View
android:id="#+id/ammabove"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/radgroupamm"
android:background="#android:color/white" />
<!-- split below is nitrite -->
<ToggleButton
android:id="#+id/NitriteToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/ammabove"
android:textOff="Nitrite"
android:textOn="Nitrite " />
<EditText
android:id="#+id/nitriteValue"
android:layout_width="150dp"
android:layout_height="30dp"
android:layout_alignBaseline="#+id/NitriteToggleButton"
android:layout_alignBottom="#+id/NitriteToggleButton"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:background="#color/white"
android:ems="10"
android:inputType="numberDecimal" >
</EditText>
<RadioGroup
android:id="#+id/radgroupnitri"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/NitriteToggleButton"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/nitriGreat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedNitriteGreater"
android:text="Greater Than" />
<RadioButton
android:id="#+id/nitriLess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedNitriteLess"
android:text="Less Than" />
</RadioGroup>
<View
android:id="#+id/nitriabove"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/radgroupnitri"
android:background="#android:color/white" />
<!-- Nitrate Below -->
<ToggleButton
android:id="#+id/NitrateToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/nitriabove"
android:textOff="Nitrate"
android:textOn="Nitrate " />
<EditText
android:id="#+id/nitrateValue"
android:layout_width="150dp"
android:layout_height="30dp"
android:layout_alignBaseline="#+id/NitrateToggleButton"
android:layout_alignBottom="#+id/NitrateToggleButton"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:background="#color/white"
android:ems="10"
android:inputType="numberDecimal" >
</EditText>
<RadioGroup
android:id="#+id/radgroupnitra"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/NitrateToggleButton"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/nitraGreat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedNitrateGreater"
android:text="Greater Than" />
<RadioButton
android:id="#+id/nitraLess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedNitrateLess"
android:text="Less Than" />
</RadioGroup>
<View
android:id="#+id/nitraabove"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/radgroupnitra"
android:background="#android:color/white" />
<!-- pH Below -->
<ToggleButton
android:id="#+id/phToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/nitraabove"
android:textOff="pH"
android:textOn="pH " />
<EditText
android:id="#+id/phValue"
android:layout_width="150dp"
android:layout_height="30dp"
android:layout_alignBaseline="#+id/phToggleButton"
android:layout_alignBottom="#+id/phToggleButton"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:background="#color/white"
android:ems="10"
android:inputType="numberDecimal" >
</EditText>
<RadioGroup
android:id="#+id/radgroupph"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/phToggleButton"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/phGreat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedPhGreater"
android:text="Greater Than" />
<RadioButton
android:id="#+id/phLess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedPhLess"
android:text="Less Than" />
</RadioGroup>
<View
android:id="#+id/phabove"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/radgroupph"
android:background="#android:color/white" />
<!-- Calcium Below -->
<ToggleButton
android:id="#+id/calciumToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/phabove"
android:textOff="Calcium"
android:textOn="Calcium " />
<EditText
android:id="#+id/calciumValue"
android:layout_width="150dp"
android:layout_height="30dp"
android:layout_alignBaseline="#+id/calciumToggleButton"
android:layout_alignBottom="#+id/calciumToggleButton"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:background="#color/white"
android:ems="10"
android:inputType="numberDecimal" >
</EditText>
<RadioGroup
android:id="#+id/radgroupcalcium"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/calciumToggleButton"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/calciumGreat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedCalciumGreater"
android:text="Greater Than" />
<RadioButton
android:id="#+id/calciumLess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedCaliumLess"
android:text="Less Than" />
</RadioGroup>
<View
android:id="#+id/calciumabove"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/radgroupcalcium"
android:background="#android:color/white" />
<!-- Phosphate Below -->
<ToggleButton
android:id="#+id/phosphateToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/calciumabove"
android:textOff="Phosphate"
android:textOn="Phosphate " />
<EditText
android:id="#+id/phosValue"
android:layout_width="150dp"
android:layout_height="30dp"
android:layout_alignBaseline="#+id/phosphateToggleButton"
android:layout_alignBottom="#+id/phosphateToggleButton"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:background="#color/white"
android:ems="10"
android:inputType="numberDecimal" >
</EditText>
<RadioGroup
android:id="#+id/radgroupphosphate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/phosphateToggleButton"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/phosphateGreat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedPhosphateGreater"
android:text="Greater Than" />
<RadioButton
android:id="#+id/phosphateLess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedPhosphateLess"
android:text="Less Than" />
</RadioGroup>
<View
android:id="#+id/phosphateabove"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/radgroupphosphate"
android:background="#android:color/white" />
<!-- temperature below -->
<ToggleButton
android:id="#+id/temperatureToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/phosphateabove"
android:textOff="Temperature"
android:textOn="Temperature " />
<EditText
android:id="#+id/temperatureValue"
android:layout_width="150dp"
android:layout_height="30dp"
android:layout_alignBaseline="#+id/temperatureToggleButton"
android:layout_alignBottom="#+id/temperatureToggleButton"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:background="#color/white"
android:ems="10"
android:inputType="numberDecimal" >
</EditText>
<RadioGroup
android:id="#+id/radgrouptemperature"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/temperatureToggleButton"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/temperatureGreat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedTemperatureGreater"
android:text="Greater Than" />
<RadioButton
android:id="#+id/TemperatureLess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedTemperatureLess"
android:text="Less Than" />
</RadioGroup>
<View
android:id="#+id/temperatureabove"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/radgrouptemperature"
android:background="#android:color/white" />
<!-- Alkalinity Below -->
<ToggleButton
android:id="#+id/alkalinityToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/temperatureabove"
android:textOff="Alkalinity"
android:textOn="Alkalinity " />
<EditText
android:id="#+id/AlkalinityValue"
android:layout_width="150dp"
android:layout_height="30dp"
android:layout_alignBaseline="#+id/alkalinityToggleButton"
android:layout_alignBottom="#+id/alkalinityToggleButton"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:background="#color/white"
android:ems="10"
android:inputType="numberDecimal" >
</EditText>
<RadioGroup
android:id="#+id/radgroupalkalinity"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/alkalinityToggleButton"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/alkalinityGreat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedAlkalinityGreater"
android:text="Greater Than" />
<RadioButton
android:id="#+id/AlkalinityLess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedAlkalinityLess"
android:text="Less Than" />
</RadioGroup>
<View
android:id="#+id/alkalinityabove"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/radgroupalkalinity"
android:background="#android:color/white" />
<!-- Magnesium Below -->
<ToggleButton
android:id="#+id/magnesiumToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/alkalinityabove"
android:textOff="Magnesium"
android:textOn="Magnesium " />
<EditText
android:id="#+id/MagnesiumValue"
android:layout_width="150dp"
android:layout_height="30dp"
android:layout_alignBaseline="#+id/magnesiumToggleButton"
android:layout_alignBottom="#+id/magnesiumToggleButton"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:background="#color/white"
android:ems="10"
android:inputType="numberDecimal" >
</EditText>
<RadioGroup
android:id="#+id/radgroupmagnesium"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/magnesiumToggleButton"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/magnesiumGreat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedMagnesiumGreater"
android:text="Greater Than" />
<RadioButton
android:id="#+id/MagnesiumLess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedMagnesiumLess"
android:text="Less Than" />
</RadioGroup>
<View
android:id="#+id/magnesiumabove"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/radgroupmagnesium"
android:background="#android:color/white" />
<!-- TDS below -->
<ToggleButton
android:id="#+id/tdsToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/magnesiumabove"
android:textOff="TDS"
android:textOn="TDS " />
<EditText
android:id="#+id/tdsValue"
android:layout_width="150dp"
android:layout_height="30dp"
android:layout_alignBaseline="#+id/tdsToggleButton"
android:layout_alignBottom="#+id/tdsToggleButton"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:background="#color/white"
android:ems="10"
android:inputType="numberDecimal" >
</EditText>
<RadioGroup
android:id="#+id/radgrouptds"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/tdsToggleButton"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/tdsGreat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedTdsGreater"
android:text="Greater Than" />
<RadioButton
android:id="#+id/tdsLess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedTdsLess"
android:text="Less Than" />
</RadioGroup>
<View
android:id="#+id/tdsabove"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/radgrouptds"
android:background="#android:color/white" />
<!-- Iodine below -->
<ToggleButton
android:id="#+id/iodineToggleButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/tdsabove"
android:textOff="Iodine"
android:textOn="Iodine " />
<EditText
android:id="#+id/iodineValue"
android:layout_width="150dp"
android:layout_height="30dp"
android:layout_alignBaseline="#+id/iodineToggleButton"
android:layout_alignBottom="#+id/iodineToggleButton"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:background="#color/white"
android:ems="10"
android:inputType="numberDecimal" >
</EditText>
<RadioGroup
android:id="#+id/radgroupiodine"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/iodineToggleButton"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/iodineGreat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedIodineGreater"
android:text="Greater Than" />
<RadioButton
android:id="#+id/iodineLess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/white"
android:onClick="onRadioButtonClickedIodineLess"
android:text="Less Than" />
</RadioGroup>
<View
android:id="#+id/iodineabove"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/radgroupiodine"
android:background="#android:color/white" />
<!-- Search button below -->
<Button
android:id="#+id/searchButton"
android:layout_width="fill_parent"
android:layout_height="60dp"
android:layout_alignTop="#+id/iodineabove"
android:text="Search" />
</RelativeLayout>
</ScrollView>

This happens because one of the views on top takes focus.
Just add
android:focusableInTouchMode="true"
to the child of your ScrollView.

Related

EditText disapear if layout_width="wrap_content" and not layout_weight="1"

The next code is OK for Eclipse Layout Editor and Android Studio. I tested it in several mobiles and works fine but, in a Samsung GT-S6310N (Android 4.1.2), this EditText dissapears. It goes at the end of a LinearLayout that defines the Layout width. The Layout is showed in a Dialog using android:Theme.Dialog.
<EditText
android:id="#+id/et_clino"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="4"
android:inputType="numberDecimal"
android:text="89.9" />
I've solved this changing the code to:
<EditText
android:id="#+id/et_clino"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="4"
android:inputType="numberDecimal"
android:text="89.9" />
The question is: is wrong mi code or is a bug?
This is the code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/LinearLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="5dp"
tools:context=".Measure" >
<RelativeLayout
android:id="#+id/rl_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/TextView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignBaseline="#+id/et_from"
android:text="#string/from"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="#+id/et_from"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/TextView1"
android:ems="7"
android:hint="#string/from"
android:lines="1"
android:maxLength="7"
android:minLines="1"
android:nextFocusDown="#+id/et_to"
android:text="1234567" />
<EditText
android:id="#+id/et_to"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/et_from"
android:layout_alignParentRight="true"
android:ems="7"
android:hint="#string/to"
android:maxLength="7"
android:maxLines="1"
android:nextFocusDown="#+id/et_distance"
android:text="1234567" />
<TextView
android:id="#+id/TextView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/et_from"
android:layout_toLeftOf="#+id/et_to"
android:text="#string/to"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
<LinearLayout
android:id="#+id/ll_b"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/tv_distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/distance_abr"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#color/green" />
<EditText
android:id="#+id/et_distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="4"
android:hint="#string/distance_abr"
android:inputType="numberDecimal"
android:lines="5"
android:maxLength="6"
android:nextFocusDown="#+id/et_rumbomag" />
<TextView
android:id="#+id/TextView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/rumbo_mn_abr"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="#+id/et_rumbomag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="4"
android:hint="#string/rumbo_mn_abr"
android:inputType="numberDecimal"
android:maxLength="5"
android:nextFocusDown="#+id/et_measured_clino"
android:text="360.0" />
<TextView
android:id="#+id/tv_clino"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/clino"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="#+id/et_clino"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="4"
android:inputType="numberDecimal"
android:text="89.9" />
<!-- Así produce error: el et_clino desaparece y el tv_clino se estrecha y muestra el texto en 3 líneas
<EditText
android:id="#+id/et_clino"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="4"
android:inputType="numberDecimal"
android:text="89.9" />
-->
</LinearLayout>
<LinearLayout
android:id="#+id/ll_d"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioGroup
android:id="#+id/rg_direction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/rb_direct"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:hint="#string/direction"
android:text="#string/direct" />
<RadioButton
android:id="#+id/rb_inverse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="#string/inverse" />
</RadioGroup>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true" >
<!--
<Button
android:id="#+id/btn_get_from_bt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BT"
android:textColor="#color/blue" />
-->
<Button
android:id="#+id/btn_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text="#string/delete"
android:textColor="#color/red" />
<ImageButton
android:id="#+id/ib_disto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="#drawable/disto" />
<Button
android:id="#+id/btn_add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="#string/save"
android:textColor="#color/green" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/ll_e"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<EditText
android:id="#+id/et_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="#string/description" >
<requestFocus />
</EditText>
</LinearLayout>
I've made some changes (particularly the LinearLayout containing the cli_no EditText, #string and #drawable resources) in the xml file as below:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="#+id/rl_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/TextView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/et_from"
android:layout_alignParentLeft="true"
android:text="#string/from"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="#+id/et_from"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/TextView1"
android:ems="7"
android:hint="#string/from"
android:lines="1"
android:maxLength="7"
android:minLines="1"
android:nextFocusDown="#+id/et_to"
android:text="1234567" />
<EditText
android:id="#+id/et_to"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/et_from"
android:layout_alignParentRight="true"
android:ems="7"
android:hint="#string/to"
android:maxLength="7"
android:maxLines="1"
android:nextFocusDown="#+id/et_distance"
android:text="1234567" />
<TextView
android:id="#+id/TextView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/et_from"
android:layout_toLeftOf="#+id/et_to"
android:text="#string/to"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
<LinearLayout
android:id="#+id/ll_b"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/tv_distance"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="distance_abr"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#color/green" />
<EditText
android:id="#+id/et_distance"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:ems="4"
android:layout_weight="1"
android:hint="distance_abr"
android:inputType="numberDecimal"
android:lines="5"
android:maxLength="6"
android:nextFocusDown="#+id/et_rumbomag" />
<TextView
android:id="#+id/TextView3"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="distance_abr"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="#+id/et_rumbomag"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:ems="4"
android:hint="rumbo"
android:inputType="numberDecimal"
android:maxLength="5"
android:text="360.0" />
<TextView
android:id="#+id/tv_clino"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="clino"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="#+id/et_clino"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="4"
android:inputType="numberDecimal"
android:text="89.9" />
</LinearLayout>
<LinearLayout
android:id="#+id/ll_d"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioGroup
android:id="#+id/rg_direction"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/rb_direct"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:hint="direction"
android:text="direct" />
<RadioButton
android:id="#+id/rb_inverse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="inverse" />
</RadioGroup>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true" >
<!--
<Button
android:id="#+id/btn_get_from_bt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BT"
android:textColor="#color/blue" />
-->
<Button
android:id="#+id/btn_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text="#string/delete" />
<ImageButton
android:id="#+id/ib_disto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="#drawable/back02" />
<Button
android:id="#+id/btn_add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="save"
android:textColor="#color/green" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/ll_e"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<EditText
android:id="#+id/et_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="#string/description" >
<requestFocus />
</EditText>
</LinearLayout>
The reason for disappearing of the EditText is that you want to display items, which has total width greater than the width of the screen, so I've applied same layout_weight:"1" to all the elements inside the LinearLayout. May be this helps you for solving your issue.

Error in R.java due to an XML file

So I created this new layout in another project and it somehow corrupted it (the project). R.java shows an error on a line
public static final class id
{
**public static final int 0dp=0x7f06003b;**
public static final int AutoCompleteTextView01=0x7f060031;
The line with the asterisks gives an error:
Syntax error on token "0d", delete this token
I thought it was just a fluke so I copied my layout xml to a working project and put it there. Bam. Same error generated in that project. I want to know if there is a problem with my layout XML.
The variable names are all generic because this was just a demo design. Can the problem be caused by the 0.5dp values I'm using?
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FBF2EF"
android:fillViewport="true" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="15dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:paddingTop="15dp" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RadioGroup01"
android:text="Pickup Address or Postcode"
android:textSize="11sp"
android:textStyle="bold"
android:layout_marginTop="40dp" />
<View
android:id="#+id/line1"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_alignLeft="#+id/textView1"
android:layout_below="#+id/textView1"
android:layout_marginTop="0.5dp"
android:background="#000000" />
<RadioGroup
android:id="#+id/radioGroup"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_alignLeft="#+id/line1"
android:layout_alignRight="#+id/line1"
android:layout_below="#+id/line1"
android:layout_marginTop="5dp"
android:gravity="center"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/radioButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="Address"
android:textSize="10sp" />
<RadioButton
android:id="#+id/radioButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="Postcode"
android:textSize="10sp" />
</RadioGroup>
<LinearLayout
android:id="#+id/linearLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/radioGroup"
android:layout_alignRight="#+id/radioGroup"
android:layout_below="#+id/radioGroup"
android:layout_marginTop="5dp"
android:weightSum="4.0" >
<EditText
android:id="#+id/editText1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:ems="10"
android:inputType="number"
android:text="House"
android:textSize="10sp" >
<requestFocus />
</EditText>
<AutoCompleteTextView
android:id="#+id/EditText01"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2.5"
android:ems="10"
android:inputType="textPostalAddress"
android:text="Street Address"
android:textSize="10sp" />
<Button
android:id="#+id/Button01"
android:layout_width="0dp"
android:layout_height="25dp"
android:layout_weight="0.7"
android:background="#drawable/roundedbutton"
android:text="Locate"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/LinearLayout01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/linearLayout1"
android:layout_alignRight="#+id/linearLayout1"
android:layout_below="#+id/linearLayout1"
android:visibility="visible"
android:weightSum="4.0" >
<AutoCompleteTextView
android:id="#+id/AutoCompleteTextView01"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3.3"
android:ems="10"
android:inputType="textCapCharacters"
android:text="Enter Postcode"
android:textSize="10sp" />
<Button
android:id="#+id/button1"
android:layout_width="0dp"
android:layout_height="25dp"
android:layout_weight="0.7"
android:background="#drawable/roundedbutton"
android:text="Search"
android:textSize="10sp" />
</LinearLayout>
<View
android:id="#+id/View01"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_alignLeft="#+id/TextView01"
android:layout_below="#+id/TextView01"
android:layout_marginTop="0.5dp"
android:background="#000000" />
<TextView
android:id="#+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/LinearLayout01"
android:layout_below="#+id/LinearLayout01"
android:layout_marginTop="10dp"
android:text="Destination Address"
android:textSize="11sp"
android:textStyle="bold" />
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/View01"
android:layout_alignParentRight="true"
android:layout_below="#+id/View01"
android:layout_marginTop="5dp"
android:ems="10"
android:hint="Destination Address"
android:inputType="textPostalAddress"
android:textSize="10sp" />
<TextView
android:id="#+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editText2"
android:layout_below="#+id/editText2"
android:layout_marginTop="10dp"
android:text="Car Type, Passengers and Payment"
android:textSize="11sp"
android:textStyle="bold" />
<LinearLayout
android:id="#+id/linearLayout2"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_alignLeft="#+id/TextView02"
android:layout_below="#+id/TextView02"
android:layout_marginTop="5dp"
android:weightSum="3" >
<Spinner
android:id="#+id/spinner2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<Spinner
android:id="#+id/spinner1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<Spinner
android:id="#+id/spinner3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<View
android:id="#+id/View02"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_alignLeft="#+id/TextView02"
android:layout_below="#+id/TextView02"
android:layout_marginTop="0.5dp"
android:background="#000000" />
<LinearLayout
android:id="#+id/linearLayout3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/linearLayout2"
android:layout_alignRight="#+id/linearLayout2"
android:layout_below="#+id/linearLayout2"
android:layout_marginTop="5dp"
android:weightSum="2" >
<EditText
android:id="#+id/0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:hint="A/C Number"
android:textSize="10sp" />
<EditText
android:id="#+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Password"
android:inputType="textPassword"
android:layout_weight="1"
android:textSize="10sp" />
</LinearLayout>
<Button
android:id="#+id/button2"
android:layout_width="70dp"
android:layout_height="30dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="41dp"
android:layout_toRightOf="#+id/TextView01"
android:background="#drawable/roundedbutton"
android:text="Continue"
android:textSize="12sp" />
<TextView
android:id="#+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="10dp"
android:text="When"
android:textSize="11sp"
android:textStyle="bold" />
<View
android:id="#+id/View03"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_alignLeft="#+id/TextView03"
android:layout_below="#+id/TextView03"
android:layout_marginTop="0.5dp"
android:background="#000000" />
<RadioGroup
android:id="#+id/RadioGroup01"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_alignLeft="#+id/View03"
android:layout_alignRight="#+id/View03"
android:layout_below="#+id/View03"
android:gravity="center"
android:orientation="horizontal"
android:layout_marginTop="5dp" >
<RadioButton
android:id="#+id/RadioButton02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="Now"
android:textSize="10sp" />
<RadioButton
android:id="#+id/RadioButton01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="Later"
android:textSize="10sp" />
</RadioGroup>
</RelativeLayout>
</ScrollView>
Problem is with this
<EditText
android:id="#+id/0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:hint="A/C Number"
android:textSize="10sp" />
Do this
<EditText
android:id="#+id/EditText0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:hint="A/C Number"
android:textSize="10sp" />
Always follow naming conventions Never start any id with Numbers
After changing this You can Clean and Rebuild the project
id cannot start with a digit or a symbol except _

how to prevent scrollview hiding other layout

clicking on edittext inside scrollview need to open other layout that should overlap scrollview(which occupies whole screen).But scrollview is hiding other layout.can anyone please give me a small hint.
<RelativeLayout
android:id="#+id/RLayout_main"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<RelativeLayout
android:id="#+id/RLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="#+id/homeButton"
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_marginLeft="10dip"
android:layout_marginTop="10dip"
android:background="#drawable/home_icon" />
<TextView
android:id="#+id/textButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="15dp"
android:background="#005288"
android:text="#string/MyProfile"
android:textColor="#ffffff" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout1"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/pickup_textView1"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="#string/Title"
android:textColor="#ffffff" />
<RadioGroup
android:id="#+id/radioGroup1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_toRightOf="#+id/pickup_textView1"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/MrRadio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/Mr"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold" >
</RadioButton>
<RadioButton
android:id="#+id/MrsRadio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/Mrs"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold" >
</RadioButton>
<RadioButton
android:id="#+id/MsRadio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/Ms"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold" >
</RadioButton>
</RadioGroup>
<TextView
android:id="#+id/required2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/radioGroup1"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout2"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/first_name"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="#string/First_Name"
android:textColor="#ffffff"
android:textSize="15sp" />
<EditText
android:id="#+id/firstNameEditText"
android:layout_width="190dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/first_name"
android:imeOptions="actionDone"
android:inputType="text"
android:textSize="15sp" />
<TextView
android:id="#+id/required3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/firstNameEditText"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout3"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/last_name"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="#string/Last_Name"
android:textColor="#ffffff"
android:textSize="15sp" />
<EditText
android:id="#+id/lastNameEditText"
android:layout_width="190dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/last_name"
android:imeOptions="actionDone"
android:inputType="text"
android:textSize="15sp" />
<TextView
android:id="#+id/required4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/lastNameEditText"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout4"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/email"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="#string/E_Mail"
android:textColor="#ffffff"
android:textSize="15sp" />
<EditText
android:id="#+id/eMailEditText"
android:layout_width="190dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/email"
android:imeOptions="actionDone"
android:inputType="textWebEmailAddress"
android:textSize="15sp" />
<TextView
android:id="#+id/required5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/eMailEditText"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
</RelativeLayout>
</ScrollView>
<include
android:layout_gravity="bottom"
layout="#layout/picker" />
</LinearLayout>
try this
<RelativeLayout
android:id="#+id/RLayout_main"
android:layout_width="Fill_parent"
android:layout_height="Fill_parent" >
<RelativeLayout
android:id="#+id/RLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="#+id/homeButton"
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_marginLeft="10dip"
android:layout_marginTop="10dip"
android:background="#drawable/home_icon" />
<TextView
android:id="#+id/textButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="15dp"
android:background="#005288"
android:text="#string/MyProfile"
android:textColor="#ffffff" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout1"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/pickup_textView1"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="#string/Title"
android:textColor="#ffffff" />
<RadioGroup
android:id="#+id/radioGroup1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_toRightOf="#+id/pickup_textView1"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/MrRadio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/Mr"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold" >
</RadioButton>
<RadioButton
android:id="#+id/MrsRadio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/Mrs"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold" >
</RadioButton>
<RadioButton
android:id="#+id/MsRadio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/Ms"
android:textColor="#fff"
android:textSize="12sp"
android:textStyle="bold" >
</RadioButton>
</RadioGroup>
<TextView
android:id="#+id/required2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/radioGroup1"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout2"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/first_name"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="#string/First_Name"
android:textColor="#ffffff"
android:textSize="15sp" />
<EditText
android:id="#+id/firstNameEditText"
android:layout_width="190dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/first_name"
android:imeOptions="actionDone"
android:inputType="text"
android:textSize="15sp" />
<TextView
android:id="#+id/required3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/firstNameEditText"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout3"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/last_name"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="#string/Last_Name"
android:textColor="#ffffff"
android:textSize="15sp" />
<EditText
android:id="#+id/lastNameEditText"
android:layout_width="190dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/last_name"
android:imeOptions="actionDone"
android:inputType="text"
android:textSize="15sp" />
<TextView
android:id="#+id/required4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/lastNameEditText"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/RLayout5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/RLayout4"
android:layout_marginLeft="10dp" >
<TextView
android:id="#+id/email"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical"
android:text="#string/E_Mail"
android:textColor="#ffffff"
android:textSize="15sp" />
<EditText
android:id="#+id/eMailEditText"
android:layout_width="190dp"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/email"
android:imeOptions="actionDone"
android:inputType="textWebEmailAddress"
android:textSize="15sp" />
<TextView
android:id="#+id/required5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/eMailEditText"
android:gravity="center_vertical"
android:text="#string/star"
android:textColor="#ff0000"
android:textSize="18sp" />
</RelativeLayout>
</ScrollView>
<include
android:layout_gravity="bottom"
layout="#layout/picker"
android:layout_below="#+id/RLayout5"
/>
</RelativeLayout>
Use this code this will help u it has fixed header and footer in that there is Scroll
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<LinearLayout
android:id="#+id/mainLinearLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="#drawable/top_bg"
android:orientation="horizontal" >
<ImageView
android:id="#+id/back_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/back_btn"
android:layout_marginTop="5dp"
android:layout_marginLeft="10dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="75dp"
android:text="Flights"
android:textColor="#android:color/white" />
</LinearLayout>
<LinearLayout
android:id="#+id/flightDetailsLayout"
android:layout_width="fill_parent"
android:layout_height="70dp"
android:layout_below="#+id/mainLinearLayout"
android:layout_centerHorizontal="true"
android:background="#drawable/gray_bg123"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/innerflightDetailsLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/from"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:paddingLeft="12dp"
android:textSize="12sp"
android:text="Delhi to Banglore, "
android:textStyle="bold" />
<TextView
android:id="#+id/tripType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="RoundTrip"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/innerTripLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/tripDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="12dp"
android:textSize="10sp"
android:text="19 Jan 2013 "
android:textStyle="bold"/>
<TextView
android:id="#+id/paxText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="for 1 Adults,0 Childs,O Infants"
android:textSize="12dp" />
</LinearLayout>
<LinearLayout
android:id="#+id/Book"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="5dp"
android:orientation="horizontal" >
<TextView
android:id="#+id/tripDate"
android:layout_width="84dp"
android:layout_height="wrap_content"
android:paddingLeft="12dp"
android:text="Rs 10,2345 /-"
android:textSize="14sp"
android:textStyle="bold" />
<ImageView
android:id="#+id/bookBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:layout_marginLeft="200dp"
android:src="#drawable/book" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/sortFlightLayouts"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/flightDetailsLayout"
android:background="#drawable/gray_bg123"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="DEL-BLR"
android:layout_marginLeft="6dp"
android:layout_marginTop="5dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:src="#drawable/flight_icon_result" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="25dp"
android:src="#drawable/time" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="5dp"
android:src="#drawable/rupee" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="1dp"
android:layout_height="60dp"
android:background="#android:color/darker_gray" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#drawable/gray_bg123"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BLR-DEL"
android:layout_marginLeft="6dp"
android:layout_marginTop="5dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:src="#drawable/flight_icon_result" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="25dp"
android:src="#drawable/time" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="5dp"
android:src="#drawable/rupee" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/footerLayout"
android:layout_below="#+id/sortFlightLayouts"
android:orientation="horizontal" >
<ListView
android:id="#+id/lvDepartures"
android:layout_weight="1"
android:layout_marginLeft="5dp"
android:choiceMode="singleChoice"
android:layout_height="wrap_content"
android:listSelector="#drawable/selection_effect"
android:layout_width="wrap_content"/>
<View
android:layout_width="1dp"
android:layout_height="wrap_content"
android:background="#android:color/darker_gray" />
<ListView
android:id="#+id/lvArrivals"
android:layout_weight="1"
android:layout_marginLeft="5dp"
android:choiceMode="singleChoice"
android:layout_height="wrap_content"
android:listSelector="#drawable/selection_effect"
android:layout_width="wrap_content"/>
</LinearLayout>
<LinearLayout
android:id="#+id/footerLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal"
android:background="#drawable/top_bg" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:layout_marginTop="5dp"
android:src="#drawable/filter" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:layout_marginTop="5dp"
android:src="#drawable/sort" />
</LinearLayout>
</RelativeLayout>

QuickcontactBadge not showing up in Layout when ran the app

I am using a FrameLayout with some EditText controls and a QuickContactBadge. Its fine till here. when I run the app, I am able to see all the controls, but QuickContactBadge not appearing in the layout.
What I need to do to make it visible? Did I miss anything?
This is my layout file,
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitXY"
android:src="#drawable/pattern1" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="50dp"
android:orientation="vertical" >
<ScrollView
android:layout_width="wrap_content"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<QuickContactBadge
android:id="#+id/quickContactBadge1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="10dp"
android:scaleType="centerCrop" />
<EditText
android:id="#+id/txtlastname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignRight="#+id/edttxtfirstname"
android:layout_marginTop="50dp"
android:ems="10"
android:hint="Last Name"
android:inputType="textPersonName"
android:textColor="#000000" />
<EditText
android:id="#+id/edttxtfirstname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:ems="10"
android:hint="First Name"
android:inputType="textPersonName"
android:textColor="#000000" >
<requestFocus />
</EditText>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#000000" >
</View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="#+id/txtheadingphone"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignRight="#+id/editText2"
android:layout_gravity="center"
android:layout_marginRight="70dp"
android:layout_weight="0.63"
android:gravity="center_vertical"
android:text="Phone"
android:textColor="#ffffffff" />
<ImageButton
android:id="#+id/imgbtnaddphone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#android:drawable/ic_input_add" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<Button
android:id="#+id/btnchphone"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Phone"
android:textColor="#ffffffff" />
<EditText
android:id="#+id/edttxtphone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.48"
android:ems="10"
android:gravity="center"
android:hint="Phone Number"
android:inputType="phone"
android:textColor="#000000" />
<ImageButton
android:id="#+id/imgbtndelphone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#android:drawable/ic_input_delete" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#000000" >
</View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="#+id/txtheadingaddress"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignRight="#+id/editText2"
android:layout_gravity="center"
android:layout_marginRight="70dp"
android:layout_weight="0.63"
android:gravity="center_vertical"
android:text="Address"
android:textColor="#ffffffff" />
<ImageButton
android:id="#+id/imgbtnaddAddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#android:drawable/ic_input_add" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<Button
android:id="#+id/btnAddress"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Home"
android:textColor="#ffffffff" />
<EditText
android:id="#+id/edttxtaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="center"
android:hint="Address"
android:inputType="textPostalAddress"
android:textColor="#000000" />
<ImageButton
android:id="#+id/imgbtndeladdress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#android:drawable/ic_input_delete" />
</LinearLayout>
<EditText
android:id="#+id/edttxtcity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="center"
android:hint="City"
android:textColor="#000000" />
<EditText
android:id="#+id/edttxtstate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="center"
android:hint="State"
android:textColor="#000000" />
<EditText
android:id="#+id/edttxzipcode"
android:layout_width="236dp"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="center"
android:hint="ZipCode"
android:inputType="phone"
android:textColor="#000000" />
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#000000" >
</View>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="#+id/txtemail"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginRight="70dp"
android:layout_weight="0.63"
android:gravity="center_vertical"
android:text="Email"
android:textColor="#ffffffff" />
<ImageButton
android:id="#+id/imgbtnaddemail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#android:drawable/ic_input_add" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<Button
android:id="#+id/btnchemail"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Email"
android:textColor="#ffffffff" />
<EditText
android:id="#+id/edttxtemail"
android:layout_width="128dp"
android:layout_height="wrap_content"
android:layout_weight="0.48"
android:ems="10"
android:gravity="center"
android:hint=""
android:inputType="textEmailAddress"
android:textColor="#000000" />
<ImageButton
android:id="#+id/imgbtndelemail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#android:drawable/ic_input_delete" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<LinearLayout
android:id="#+id/LinearLayout02"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:background="#AA000000" >
<Button
android:id="#+id/btnsave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="addCustomerDetails"
android:text="Save"
android:textColor="#000000"
>
</Button>
<Button
android:id="#+id/btncancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Cancel"
android:textColor="#000000"
android:onClick="canceladdcustomer">
</Button>
</LinearLayout>
</FrameLayout>
Please correct me or provide any useful links, so that I will come to know my mistake.
Thanks for your valuable help!!

Adding a horizontalScrollView to bottom navigation bar

I have an activity which contains a table layout and below it I have some buttons, I then implemented a sort of navigation bar using radio group and radio buttons. What I want to do is add a horizontal scroll view to this radio group, however when I try to add it the navigation bar just changes position to the top of the activity to collapse with the table layout and I need this navigation bar to stick to the bottom of the activity. Any help would be much appreciated. Thanks in advance.
Here's my xml code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/bckgroundchinese"
android:id="#+id/bottom_layout" >
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbarFadeDuration="0"
android:scrollbarSize="12dip" >
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:background="#3b3b3b" >
<TableLayout
android:id="#+id/myTableLayout"
android:layout_width="match_parent"
android:layout_height="276dp"
android:background="#drawable/bckgroundchinese" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="NO PATIENTS" />
</TableLayout>
</HorizontalScrollView>
</ScrollView>
<Button
android:id="#+id/patient"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/radioGroup1"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:background="#drawable/buttonchinese"
android:text="Add Patient" />
<Button
android:id="#+id/signtOutDr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/patient"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:background="#drawable/buttonchinese"
android:text="sign out" />
<Button
android:id="#+id/info"
android:layout_width="450dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_above="#+id/alerts"
android:background="#drawable/buttonchinese"
android:text="Edit My Information" />
<Button
android:id="#+id/alerts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/signtOutDr"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:background="#drawable/buttonchinese"
android:text="View Alerts" />
<!--
<HorizontalScrollView
android:id="#+id/scrollView2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbarFadeDuration="0"
android:scrollbarSize="5dip" >
-->
<RadioGroup
android:id="#+id/radioGroup1"
android:layout_width="fill_parent"
android:layout_height="71dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:background="#drawable/bckgroundchinese"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/btnAll"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:drawableTop="#drawable/navbar_allselector"
android:gravity="bottom|center_horizontal"
android:text="My Patients" />
<RadioButton
android:id="#+id/btnPicture"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:drawableTop="#drawable/doctoricon"
android:text="View Assistants" />
<RadioButton
android:id="#+id/btnVideo"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:drawableTop="#drawable/records"
android:text="Add Assistants" />
<RadioButton
android:id="#+id/btnFile"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:drawableTop="#drawable/phonebook_"
android:text="Add Patient" />
<RadioButton
android:id="#+id/btnEditInfo"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:drawableTop="#drawable/phonebook_"
android:text="Edit My Info" />
</RadioGroup>
<!-- </HorizontalScrollView> -->
</RelativeLayout>
Salma i have fixed your problem but removed some background image as it was not existing in my system so take below code and add those background image.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="#+id/bottom_layout" >
<HorizontalScrollView
android:id="#+id/mytabview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:background="#3b3b3b" >
<TableLayout
android:id="#+id/myTableLayout"
android:layout_width="match_parent"
android:layout_height="276dp"
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="NO PATIENTS" />
</TableLayout>
</HorizontalScrollView>
<!--
<HorizontalScrollView
android:id="#+id/scrollView2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbarFadeDuration="0"
android:scrollbarSize="5dip" >
-->
<!-- </HorizontalScrollView> -->
<LinearLayout
android:id="#+id/nav"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/mytabview" >
<Button
android:id="#+id/patient"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/buttonchinese"
android:text="Add Patient" />
<Button
android:id="#+id/signtOutDr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/buttonchinese"
android:text="sign out" />
<Button
android:id="#+id/info"
android:layout_width="450dp"
android:layout_height="wrap_content"
android:background="#drawable/buttonchinese"
android:text="Edit My Information" />
<Button
android:id="#+id/alerts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/buttonchinese"
android:text="View Alerts" />
</LinearLayout>
<RadioGroup
android:id="#+id/radioGroup1"
android:layout_width="fill_parent"
android:layout_height="71dp"
android:layout_alignParentBottom="true"
android:background="#drawable/bckgroundchinese"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/btnAll"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:drawableTop="#drawable/navbar_allselector"
android:gravity="bottom|center_horizontal"
android:text="My Patients" />
<RadioButton
android:id="#+id/btnPicture"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:drawableTop="#drawable/doctoricon"
android:text="View Assistants" />
<RadioButton
android:id="#+id/btnVideo"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:drawableTop="#drawable/records"
android:text="Add Assistants" />
<RadioButton
android:id="#+id/btnFile"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:drawableTop="#drawable/phonebook_"
android:text="Add Patient" />
<RadioButton
android:id="#+id/btnEditInfo"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:drawableTop="#drawable/phonebook_"
android:text="Edit My Info" />
</RadioGroup>
</RelativeLayout>
you need to move those properties:
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
from the RadioGroup to the HorizontalScrollView, Like this:
<HorizontalScrollView
android:id="#+id/scrollView2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:scrollbarFadeDuration="0"
android:scrollbarSize="5dip" >
<RadioGroup
android:id="#+id/radioGroup1"
android:layout_width="fill_parent"
android:layout_height="71dp"
android:background="#drawable/bckgroundchinese"
android:orientation="horizontal" >
<RadioButton
android:id="#+id/btnAll"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:drawableTop="#drawable/navbar_allselector"
android:gravity="bottom|center_horizontal"
android:text="My Patients" />
<RadioButton
android:id="#+id/btnPicture"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:drawableTop="#drawable/doctoricon"
android:text="View Assistants" />
<RadioButton
android:id="#+id/btnVideo"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:drawableTop="#drawable/records"
android:text="Add Assistants" />
<RadioButton
android:id="#+id/btnFile"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:drawableTop="#drawable/phonebook_"
android:text="Add Patient" />
<RadioButton
android:id="#+id/btnEditInfo"
style="#style/navbar_button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:drawableTop="#drawable/phonebook_"
android:text="Edit My Info" />
</RadioGroup>

Categories

Resources