Inside my xml file i put a scroll view. But it doesn't shows in my program. I was confused because i checked for any color problems. Here is my xml file, can anyone specifies the reason it doesn't shown at there?
Please note: some characters from textview and edittext are removed due to character limitation by stack overflow.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/RelativeLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
android:id="#+id/rtop"
android:layout_width="wrap_content"
android:background="#drawable/top_transperant_bg" >
<Button
android:id="#+id/imageViewlogo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/textView3"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="#android:color/transparent"
android:drawableTop="#drawable/icon_home"
android:paddingTop="5dp"
android:text="Your Home"
android:textColor="#c1c1c1" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
/>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/bg_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/rtop"
android:layout_above="#+id/Rbottom"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:paddingTop="10dp"
>
<ScrollView
android:id="#+id/s1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="#+id/midle"
android:scrollbars="none"
android:fillViewport="true"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/Rcentre"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:orientation="vertical" >
<RelativeLayout
android:id="#+id/rela"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText3"
/>
<EditText
android:id="#+id/editText1"
android:layout_width="#dimen/Edittextwidth"
android:layout_height="#dimen/Edittextheight"
android:layout_centerHorizontal="true"
android:layout_alignParentRight="true"
android:capitalize="words"
android:textSize="#dimen/font_size_normal" >
</EditText>
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText1"
android:layout_marginTop="5dp"
android:inputType="textMultiLine"
android:maxLines="6"
android:text="Contact Person" />
<EditText
android:id="#+id/editText2"
android:layout_width="#dimen/Edittextwidth"
android:layout_height="#dimen/Edittextheight"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView2"
android:layout_marginTop="5dp"
android:background="#drawable/regtextfieldborder"
android:ems="10"
android:padding="5dp"
android:capitalize="words"
android:singleLine="true"
android:layout_alignParentRight="true"
android:textSize="#dimen/font_size_normal" />
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/checkBox3"
android:layout_marginTop="5dp"
android:text="Home Email" />
<EditText
android:id="#+id/editText4"
android:layout_width="#dimen/Edittextwidth"
android:layout_height="#dimen/Edittextheight"
android:layout_alignLeft="#+id/textView5"
android:layout_below="#+id/textView5"
android:layout_marginTop="5dp"
android:background="#drawable/regtextfieldborder"
android:editable="false"
android:ems="10"
android:focusable="false"
android:padding="5dp"
android:singleLine="true"
android:layout_alignParentRight="true"
android:textSize="#dimen/font_size_normal" />
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/checkBox1"
android:layout_marginTop="5dp"
android:text="Home Phone Number" />
<EditText
android:id="#+id/editText9"
android:layout_width="#dimen/Edittextwidth"
android:layout_height="#dimen/Edittextheight"
android:layout_alignLeft="#+id/textView9"
android:layout_below="#+id/textView9"
<EditText
android:id="#+id/editText10"
android:layout_width="#dimen/Edittextwidth"
android:layout_height="wrap_content"
android:focusableInTouchMode="true"
android:gravity="top"
android:imeOptions="actionDone"
android:lines="6"
android:maxLines="10"
android:padding="5dp"
android:scrollHorizontally="false"
android:layout_alignParentRight="true"
android:inputType="textCapSentences|textMultiLine"
android:scrollbars="vertical"
android:textSize="#dimen/font_size_normal" />
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editText10"
android:layout_below="#+id/editText10"
android:layout_marginTop="5dp"
android:text="Residence Type" />
<Spinner
android:id="#+id/spinner1"
android:layout_width="#dimen/Edittextwidth"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView6"
android:layout_alignParentRight="true"
android:layout_alignRight="#+id/editText10"
android:layout_below="#+id/textView6"
android:layout_marginTop="5dp"
android:background="#drawable/combo_bx"
android:padding="5dp"
android:popupBackground="#android:color/transparent"
android:spinnerMode="dropdown" />
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
/>
<CheckBox
android:id="#+id/checkBox1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignRight="#+id/textView4"
android:layout_below="#+id/editText4"
android:layout_marginTop="5dp"
android:text="Share my email address with other homeowners"
android:textColor="#FF0000"
android:visibility="gone"
android:textSize="#dimen/font_size_normal" />
<CheckBox
android:id="#+id/checkBox2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignRight="#+id/editText9"
android:layout_below="#+id/editText9"
android:layout_marginTop="5dp"
android:text="Show my info to other residents"
android:textColor="#FFFFFF"
android:textSize="#dimen/font_size_normal" />
<CheckBox
android:id="#+id/checkBox3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText2"
android:layout_marginTop="5dp"
android:text="Share my contact with other homeowners"
android:textColor="#FF0000"
android:visibility="gone"
android:textSize="#dimen/font_size_normal" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/spinner1"
android:layout_marginRight="40dp"
android:clickable="true"
android:text="Next>>"
android:visibility="gone" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/spinner1"
android:layout_marginTop="5dp" >
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Vehicle Status "
android:textColor="#c1c1c1" />
<RadioButton
android:id="#+id/radioButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/view1"
android:layout_alignParentTop="true"
android:layout_toLeftOf="#+id/radioButton2"
android:layout_toRightOf="#+id/textView5"
android:layout_marginBottom="5dp"
android:text=" Yes" />
<View
android:id="#+id/view1"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/textView5"
android:layout_marginTop="5dp"
android:background="#c1c1c1" />
<RelativeLayout
android:id="#+id/relativeLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/view1"
android:layout_marginTop="5dp" >
<LinearLayout
android:id="#+id/firstvehicle"
android:layout_width="282dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/textView1"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:text="Make "
android:textColor="#c1c1c1" />
<EditText
android:id="#+id/vehiclemake1"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:background="#drawable/regtextfieldborder"
android:ems="9"
android:padding="5dp"
android:inputType="textCapSentences"
android:textSize="#dimen/font_size_normal"
android:singleLine="true" />
<TextView
android:id="#+id/textView2more1"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginLeft="5dp"
android:background="#drawable/more_button"
android:clickable="true"
android:visibility="gone"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/textView1"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:text="Model "
android:textColor="#c1c1c1" />
<EditText
android:id="#+id/vehiclemodel1"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:background="#drawable/regtextfieldborder"
android:ems="9"
android:layout_alignParentRight="true"
android:textSize="#dimen/font_size_normal"
android:inputType="textCapSentences"
android:padding="5dp"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/textView1"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:text="License"
android:textColor="#c1c1c1" />
<EditText
android:id="#+id/vehiclenumber1"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:background="#drawable/regtextfieldborder"
android:ems="9"
android:padding="5dp"
android:inputType="textCapWords"
android:layout_alignParentRight="true"
android:textSize="#dimen/font_size_normal"
android:singleLine="true" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearcolour"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="50dp"
android:layout_height="wrap_content"
android:textColor="#c1c1c1"
android:text="Color " />
<EditText
android:id="#+id/colour"
android:singleLine="true"
android:ems="9" />
<TextView
android:id="#+id/textView2more"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginLeft="5dp"
android:background="#drawable/more_button"
android:clickable="true"
android:gravity="center" />
</LinearLayout>
<View
android:id="#+id/view1"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_marginTop="5dp"
android:background="#c1c1c1" />
</LinearLayout>
<LinearLayout
android:id="#+id/mainLinearLayouts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/firstvehicle"
android:orientation="vertical" >
</LinearLayout>
<Button
android:id="#+id/button1"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_below="#+id/mainLinearLayouts"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:background="#drawable/buttoncolour"
android:onClick="submit"
android:text="Submit"
android:visibility="gone"
android:textColor="#c1c1c1" />
</RelativeLayout>
<RadioButton
android:id="#+id/radioButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/relativeLayout1"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="5dp"
android:layout_marginRight="20dp"
android:text=" No" />
</RelativeLayout>
<TextView
android:id="#+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/textView7"
android:layout_alignLeft="#+id/textView1"
android:text="Address" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView1"
android:layout_alignRight="#+id/editText1"
android:layout_below="#+id/textView8"
android:layout_marginTop="5dp"
android:background="#drawable/regtextfieldborder"
android:ems="10"
android:gravity="top"
android:inputType="textMultiLine|textCapSentences"
android:lines="5"
android:maxLines="6"
android:padding="5dp"
android:layout_centerHorizontal="true"
android:layout_alignParentRight="true"
android:textSize="#dimen/font_size_normal" >
</EditText>
<ImageView
android:id="#+id/imageView1"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:background="#c1c1c1"
android:padding="2dp"
android:src="#drawable/profile_image" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/midle"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_marginTop="5dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true" >
<Button
android:id="#+id/buttonsubmit"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="5dp"
android:layout_marginLeft="5dp"
android:background="#drawable/buttoncolour"
android:gravity="center"
android:textColor="#c1c1c1"
android:text="Submit"/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="#+id/Rbottom"
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true" >
</RelativeLayout>
</RelativeLayout>
You used Some illegal character with XML
Also You have used some Empty views. That will not display proper output. and Each and every view must have height and width attribute in it. You missed in some.
I corrected some errors. This Might can help.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/rtop"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#ff6700" >
<RelativeLayout
android:id="#+id/rtop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#80ff6700" >
<Button
android:id="#+id/imageViewlogo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/textView3"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="#android:color/transparent"
android:drawableTop="#drawable/ic_launcher"
android:paddingTop="5dp"
android:text="Your Home"
android:textColor="#c1c1c1" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/Rbottom"
android:layout_below="#+id/rtop"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="#20ff6700"
android:paddingTop="10dp" >
<ScrollView
android:id="#+id/s1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
android:orientation="vertical"
android:scrollbars="none" >
<LinearLayout
android:id="#+id/Rcentre"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:orientation="vertical" >
<RelativeLayout
android:id="#+id/rela"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText3" />
<EditText
android:id="#+id/editText1"
android:layout_width="80dp"
android:layout_height="20dp"
android:layout_alignParentRight="true"
android:layout_centerHorizontal="true"
android:capitalize="words"
android:textSize="10sp" >
</EditText>
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText1"
android:layout_marginTop="5dp"
android:inputType="textMultiLine"
android:maxLines="6"
android:text="Contact Person" />
<EditText
android:id="#+id/editText2"
android:layout_width="80sp"
android:layout_height="20sp"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/textView2"
android:layout_marginTop="5dp"
android:background="#ff6700"
android:capitalize="words"
android:ems="10"
android:padding="5dp"
android:singleLine="true"
android:textSize="10sp" />
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/checkBox3"
android:layout_marginTop="5dp"
android:text="Home Email" />
<EditText
android:id="#+id/editText4"
android:layout_width="80dp"
android:layout_height="20dp"
android:layout_alignLeft="#+id/textView5"
android:layout_alignParentRight="true"
android:layout_below="#+id/textView5"
android:layout_marginTop="5dp"
android:background="#ff6700"
android:editable="false"
android:ems="10"
android:focusable="false"
android:padding="5dp"
android:singleLine="true"
android:textSize="10sp" />
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/checkBox1"
android:layout_marginTop="5dp"
android:text="Home Phone Number" />
<EditText
android:id="#+id/editText9"
android:layout_width="80dp"
android:layout_height="20dp"
android:layout_alignLeft="#+id/textView9"
android:layout_below="#+id/textView9" />
<EditText
android:id="#+id/editText10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:focusableInTouchMode="true"
android:gravity="top"
android:imeOptions="actionDone"
android:inputType="textCapSentences|textMultiLine"
android:lines="6"
android:maxLines="10"
android:padding="5dp"
android:scrollHorizontally="false"
android:scrollbars="vertical"
android:textSize="10dp" />
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editText10"
android:layout_below="#+id/editText10"
android:layout_marginTop="5dp"
android:text="Residence Type" />
<Spinner
android:id="#+id/spinner1"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView6"
android:layout_alignParentRight="true"
android:layout_alignRight="#+id/editText10"
android:layout_below="#+id/textView6"
android:layout_marginTop="5dp"
android:background="#ff6700"
android:padding="5dp"
android:popupBackground="#android:color/transparent"
android:spinnerMode="dropdown" />
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<CheckBox
android:id="#+id/checkBox1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignRight="#+id/textView4"
android:layout_below="#+id/editText4"
android:layout_marginTop="5dp"
android:text="Share my email address with other homeowners"
android:textColor="#FF0000"
android:textSize="10dp"
android:visibility="gone" />
<CheckBox
android:id="#+id/checkBox2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignRight="#+id/editText9"
android:layout_below="#+id/editText9"
android:layout_marginTop="5dp"
android:text="Show my info to other residents"
android:textColor="#FFFFFF"
android:textSize="10sp" />
<CheckBox
android:id="#+id/checkBox3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText2"
android:layout_marginTop="5dp"
android:text="Share my contact with other homeowners"
android:textColor="#FF0000"
android:textSize="10sp"
android:visibility="gone" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/spinner1"
android:layout_marginRight="40dp"
android:clickable="true"
android:text="Next>>"
android:visibility="gone" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/spinner1"
android:layout_marginTop="5dp" >
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Vehicle Status "
android:textColor="#c1c1c1" />
<RadioButton
android:id="#+id/radioButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/view1"
android:layout_alignParentTop="true"
android:layout_marginBottom="5dp"
android:layout_toLeftOf="#+id/radioButton2"
android:layout_toRightOf="#+id/textView5"
android:text=" Yes" />
<View
android:id="#+id/view1"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="#+id/textView5"
android:layout_marginTop="5dp"
android:background="#c1c1c1" />
<RelativeLayout
android:id="#+id/relativeLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/view1"
android:layout_marginTop="5dp" >
<LinearLayout
android:id="#+id/firstvehicle"
android:layout_width="282dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/textView1"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:text="Make "
android:textColor="#c1c1c1" />
<EditText
android:id="#+id/vehiclemake1"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:background="#ff6700"
android:ems="9"
android:inputType="textCapSentences"
android:padding="5dp"
android:singleLine="true"
android:textSize="10sp" />
<TextView
android:id="#+id/textView2more1"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginLeft="5dp"
android:background="#ff6700"
android:clickable="true"
android:gravity="center"
android:visibility="gone" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/textView1"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:text="Model "
android:textColor="#c1c1c1" />
<EditText
android:id="#+id/vehiclemodel1"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_alignParentRight="true"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:background="#ff6700"
android:ems="9"
android:inputType="textCapSentences"
android:padding="5dp"
android:singleLine="true"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="#+id/textView1"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:text="License"
android:textColor="#c1c1c1" />
<EditText
android:id="#+id/vehiclenumber1"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_alignParentRight="true"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:background="#ff6700"
android:ems="9"
android:inputType="textCapWords"
android:padding="5dp"
android:singleLine="true"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearcolour"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="50dp"
android:layout_height="wrap_content"
android:text="Color "
android:textColor="#c1c1c1" />
<EditText
android:id="#+id/colour"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:ems="9"
android:singleLine="true" />
<TextView
android:id="#+id/textView2more"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginLeft="5dp"
android:background="#ff6700"
android:clickable="true"
android:gravity="center" />
</LinearLayout>
<View
android:id="#+id/view1"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_marginTop="5dp"
android:background="#c1c1c1" />
</LinearLayout>
<LinearLayout
android:id="#+id/mainLinearLayouts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/firstvehicle"
android:orientation="vertical" >
</LinearLayout>
<Button
android:id="#+id/button1"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_below="#+id/mainLinearLayouts"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:background="#ff6700"
android:onClick="submit"
android:text="Submit"
android:textColor="#c1c1c1"
android:visibility="gone" />
</RelativeLayout>
<RadioButton
android:id="#+id/radioButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/relativeLayout1"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="5dp"
android:layout_marginRight="20dp"
android:text=" No" />
</RelativeLayout>
<TextView
android:id="#+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView1"
android:layout_below="#+id/textView7"
android:text="Address" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView1"
android:layout_alignParentRight="true"
android:layout_alignRight="#+id/editText1"
android:layout_below="#+id/textView8"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:background="#ff6700"
android:ems="10"
android:gravity="top"
android:inputType="textMultiLine|textCapSentences"
android:lines="5"
android:maxLines="6"
android:padding="5dp"
android:textSize="10sp" >
</EditText>
<ImageView
android:id="#+id/imageView1"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:background="#c1c1c1"
android:padding="2dp"
android:src="#drawable/ic_launcher" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
<RelativeLayout
android:id="#+id/midle"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_marginTop="5dp" >
<Button
android:id="#+id/buttonsubmit"
android:layout_width="100dp"
android:layout_height="35dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="5dp"
android:layout_marginLeft="5dp"
android:background="#ff6700"
android:gravity="center"
android:text="Submit"
android:textColor="#c1c1c1" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/Rbottom"
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true" />
</RelativeLayout>
Related
i am stuck how to scroll layout when keyboard appear? this is my static page but when my keyboard appear then my scrollview is not working.i can not give hard code height of scrollview. please help me..
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/settingLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/splash_bg" >
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<ImageView
android:id="#+id/tree_iv_userSettings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#drawable/tree_transparent" />
<ImageView
android:id="#+id/image1"
android:layout_width="90dp"
android:layout_height="110dp"
android:layout_centerHorizontal="true"
android:layout_marginBottom="30dp"
android:src="#drawable/frame_large" />
<TextView
android:id="#+id/changepassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/image1"
android:layout_marginLeft="20dp"
android:background="#android:color/transparent"
android:hint="CHANGE PASSWORD"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/black"
android:textColorHint="#android:color/black" />
<EditText
android:id="#+id/editname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/changepassword"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:background="#android:color/transparent"
android:hint="EDIT NAME"
android:maxLength="20"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColorHint="#android:color/black" />
<EditText
android:id="#+id/editphoneno"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editname"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:background="#android:color/transparent"
android:hint="EDIT PHONE NUMBER"
android:maxLength="15"
android:numeric="integer"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColorHint="#android:color/black" />
<TextView
android:id="#+id/edittype"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editphoneno"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:background="#android:color/transparent"
android:singleLine="true"
android:text="EDIT TYPE"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/black" />
<TextView
android:id="#+id/notification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/edittype"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:background="#android:color/transparent"
android:singleLine="true"
android:text="NOTIFICATION"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/black" />
<Button
android:id="#+id/togNot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/save"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:background="#drawable/on_button" />
<TextView
android:id="#+id/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/notification"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:background="#android:color/transparent"
android:text="SAVE "
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/black"
android:textSize="40dp" />
<ProgressBar
android:id="#+id/progressBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/image1"
android:layout_centerHorizontal="true"
android:layout_marginBottom="27dp" />
</RelativeLayout>
</ScrollView>
Please help me out.
suggestions apreciated
Thanks Kind Regards.
Try this:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#drawable/splash_bg" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="#+id/tree_iv_userSettings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#drawable/tree_transparent" />
<ImageView
android:id="#+id/image1"
android:layout_width="90dp"
android:layout_height="110dp"
android:layout_centerHorizontal="true"
android:layout_marginBottom="30dp"
android:src="#drawable/frame_large" />
<TextView
android:id="#+id/changepassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/image1"
android:layout_marginLeft="20dp"
android:background="#android:color/transparent"
android:hint="CHANGE PASSWORD"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/black"
android:textColorHint="#android:color/black" />
<EditText
android:id="#+id/editname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/changepassword"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:background="#android:color/transparent"
android:hint="EDIT NAME"
android:maxLength="20"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColorHint="#android:color/black" />
<EditText
android:id="#+id/editphoneno"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editname"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:background="#android:color/transparent"
android:hint="EDIT PHONE NUMBER"
android:maxLength="15"
android:numeric="integer"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColorHint="#android:color/black" />
<TextView
android:id="#+id/edittype"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editphoneno"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:background="#android:color/transparent"
android:singleLine="true"
android:text="EDIT TYPE"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/black" />
<TextView
android:id="#+id/notification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/edittype"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:background="#android:color/transparent"
android:singleLine="true"
android:text="NOTIFICATION"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/black" />
<Button
android:id="#+id/togNot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/save"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:background="#drawable/on_button" />
<TextView
android:id="#+id/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/notification"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:background="#android:color/transparent"
android:text="SAVE "
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/black"
android:textSize="40dp" />
<ProgressBar
android:id="#+id/progressBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/image1"
android:layout_centerHorizontal="true"
android:layout_marginBottom="27dp" />
</RelativeLayout>
And add this code to ypur manifest project:
<activity
android:name="YourActivity"
android:windowSoftInputMode="stateVisible|stateAlwaysVisible" >
</activity>
add this code in ur manifest activty
android:windowSoftInputMode="adjustPan|stateAlwaysVisible"
this code useful for scrolling relative layout..
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<RelativeLayout
android:id="#+id/settingLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#drawable/splash_bg" >
<ImageView
android:id="#+id/tree_iv_userSettings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#drawable/tree_transparent" />
<ImageView
android:id="#+id/image1"
android:layout_width="90dp"
android:layout_height="110dp"
android:layout_centerHorizontal="true"
android:layout_marginBottom="30dp"
android:src="#drawable/frame_large" />
<TextView
android:id="#+id/changepassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/image1"
android:layout_marginLeft="20dp"
android:background="#android:color/transparent"
android:hint="CHANGE PASSWORD"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/black"
android:textColorHint="#android:color/black" />
<EditText
android:id="#+id/editname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/changepassword"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:background="#android:color/transparent"
android:hint="EDIT NAME"
android:maxLength="20"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColorHint="#android:color/black" />
<EditText
android:id="#+id/editphoneno"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editname"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:background="#android:color/transparent"
android:hint="EDIT PHONE NUMBER"
android:maxLength="15"
android:numeric="integer"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColorHint="#android:color/black" />
<TextView
android:id="#+id/edittype"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editphoneno"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:background="#android:color/transparent"
android:singleLine="true"
android:text="EDIT TYPE"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/black" />
<TextView
android:id="#+id/notification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/edittype"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:background="#android:color/transparent"
android:singleLine="true"
android:text="NOTIFICATION"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/black" />
<Button
android:id="#+id/togNot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/save"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:background="#drawable/on_button" />
<TextView
android:id="#+id/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/notification"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:background="#android:color/transparent"
android:text="SAVE "
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/black"
android:textSize="40dp" />
<ProgressBar
android:id="#+id/progressBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/image1"
android:layout_centerHorizontal="true"
android:layout_marginBottom="27dp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/bottomRelay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="7.5dp"
android:background="#android:color/transparent"
android:visibility="gone" >
<TextView
android:id="#+id/Upload"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:background="#ededed"
android:gravity="center"
android:text="Upload Photo"
android:textColor="#8F8F8F"
android:textSize="20dp"
android:textStyle="bold" />
<ImageView
android:id="#+id/border1"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#id/Upload"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:background="#939393" />
<TextView
android:id="#+id/choose_existing"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="#+id/border1"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginTop="1dp"
android:background="#ededed"
android:gravity="center"
android:text="Library"
android:textColor="#007AFF"
android:textSize="20dp"
android:textStyle="bold" />
<ImageView
android:id="#+id/border2"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#id/choose_existing"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:background="#939393" />
<TextView
android:id="#+id/Camera"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="#+id/border2"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginTop="1dp"
android:background="#ededed"
android:gravity="center"
android:text="Camera"
android:textColor="#007AFF"
android:textSize="20dp"
android:textStyle="bold" />
<ImageView
android:id="#+id/border3"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#id/Camera"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:background="#939393" />
<TextView
android:id="#+id/cancel"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="#+id/border3"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginTop="20dp"
android:background="#ededed"
android:gravity="center"
android:text="Cancel"
android:textColor="#007AFF"
android:textSize="20dp"
android:textStyle="bold" />
</RelativeLayout>
</RelativeLayout>
</ScrollView>
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 _
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>
I create an application when with a form that contains many field and one of them show a dialog but if i in latest item show in dialog ok button screen move to first or other edittext
and screen position change.
i wont screen position not change after click on the button
thanks for your help
this is my layout code:
** <?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:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="none"
tools:context=".SabtTavalodActivity" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/linearasli"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center|top"
android:gravity="center|right"
android:orientation="vertical" >
<RelativeLayout
android:id="#+id/spinnerRel"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="#+id/txtheadermonasebat"
style="#style/sectionHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="MOnasebat: " />
<Spinner
android:id="#+id/spinner"
style="#style/SpinnerCalenderComp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/txtheadermonasebat"
android:layout_toLeftOf="#+id/txtmonasebat"
/>
<!-- android:entries="#array/moshakhasat" -->
<TextView
android:id="#+id/txtmonasebat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/spinner"
android:layout_alignBottom="#+id/spinner"
android:layout_alignParentRight="true"
android:layout_marginRight="24dp"
android:gravity="right"
android:text="monasebat: " />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="#+id/txtname"
style="#style/sectionHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:gravity="right"
android:text="Name: " />
<EditText
android:id="#+id/name"
android:inputType="text"
style="#style/EditTextCalenderComp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:textColorHint="#cacaca"
android:ems="10"
android:singleLine = "true"
android:maxLines = "1"
android:lines = "1"
>
</EditText>
<!--
<QuickContactBadge
android:id="#+id/quickContactBadge1"
android:layout_width="75dp"
android:layout_height="75dp"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="#+id/name"
android:src="#drawable/rihanna"
></QuickContactBadge>
-->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:background="#drawable/image_bg"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="#+id/name"
android:layout_marginTop="55sp"
android:padding="3dip" >
<ImageView
android:id="#+id/imgvw32"
android:layout_width="65dip"
android:layout_height="65dip"
android:contentDescription="#string/axpick"
android:src="#drawable/rihanna"
android:scaleType="fitXY"/>
</LinearLayout>
</RelativeLayout>
**<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15sp">
<TextView
android:id="#+id/txtBirtday"
style="#style/sectionHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:gravity="right"
android:paddingTop="10dp"
android:text="Birtday: " />
<Button
android:id="#+id/btnDatePicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="55dip"
android:background="#drawable/btn_add_datapicker"
/>
<TextView
android:id="#+id/txtsabtbirthday"
android:background="#drawable/btn_toggle_on_focused_holo_light"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="85sp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:gravity="center"
android:textColorHint="#cacaca" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25sp" >
<TextView
android:id="#+id/txtsalepish"
style="#style/sectionHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:gravity="right"
android:text="sale pish: " />
<EditText
android:id="#+id/salepish"
android:inputType="text"
android:paddingTop="85dip"
style="#style/EditTextCalenderComp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:ems="10"
android:lines="1"
android:maxLines="1"
android:singleLine="true"
android:textColorHint="#cacaca" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25sp">
<TextView
android:id="#+id/txtrate"
style="#style/sectionHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:gravity="right"
android:text="alaghe be in fard: " />
<RatingBar
android:id="#+id/ratingBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="65dp"
android:progressDrawable="#drawable/heart_rate" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp" >
<TextView
android:id="#+id/txtHeaderAlarm"
style="#style/sectionHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:gravity="right"
android:text="Alarm: " />
<CheckBox
android:id="#+id/AlarmcheckBox1"
style="#style/CheckBoxCalenderComp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/txtHeaderAlarm"
android:text="ErsalMessage" />
<TextView
android:id="#+id/txtsabtAlarm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/AlarmcheckBox1"
android:gravity="right"
android:text="Message: "
android:textColor="#cacaca"
android:textSize="16dp" />
<CheckBox
android:id="#+id/AlarmcheckBoxTarikh"
style="#style/CheckBoxCalenderComp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/txtsabtAlarm"
android:text="ErsalMessage" />
<TextView
android:id="#+id/txtsabtAlarmTarikh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/AlarmcheckBoxTarikh"
android:gravity="right"
android:text="Message: "
android:textColor="#cacaca"
android:textSize="16dp" />
<CheckBox
android:id="#+id/AlarmcheckBoxHardo"
style="#style/CheckBoxCalenderComp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/txtsabtAlarmTarikh"
android:text="ErsalMessage" />
<CheckBox
android:id="#+id/CheckBoxPickSong"
style="#style/CheckBoxCalenderComp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/txtHeaderAlarm"
android:layout_toLeftOf="#+id/AlarmcheckBoxTarikh"
android:text="ErsalMessage" />
<TextView
android:id="#+id/TextPickSong"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/AlarmcheckBox1"
android:layout_toLeftOf="#+id/AlarmcheckBoxTarikh"
android:gravity="right"
android:text="Message: "
android:textColor="#cacaca"
android:textSize="16dp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/relMsg"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp">
<TextView
android:id="#+id/txtHeaderMsg"
style="#style/sectionHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:gravity="right"
android:text="Message: " />
<CheckBox
android:id="#+id/msgcheckBox1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
style="#style/CheckBoxCalenderComp"
android:layout_below="#+id/txtHeaderMsg"
android:text="ErsalMessage" />
<TextView
android:id="#+id/txtMSgactive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/msgcheckBox1"
android:gravity="right"
android:text="Message: "
android:textColor="#cacaca"
android:textSize="16dp" />
<CheckBox
android:id="#+id/msgcheckBoxTarikh"
style="#style/CheckBoxCalenderComp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/txtMSgactive"
android:text="ErsalMessage"
/>
<TextView
android:id="#+id/txtMSgactiveTarikh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/msgcheckBoxTarikh"
android:gravity="right"
android:text="Message: "
android:textColor="#cacaca"
android:textSize="16dp" />
<CheckBox
android:id="#+id/msgcheckBoxSaat"
style="#style/CheckBoxCalenderComp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/txtMSgactiveTarikh"
android:text="ErsalMessage"
/>
<TextView
android:id="#+id/txtMSgactiveSaat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/msgcheckBoxSaat"
android:gravity="right"
android:text="Message: "
android:textColor="#cacaca"
android:textSize="16dp" />
</RelativeLayout>
<TextView
android:id="#+id/txtNote"
android:layout_width="fill_parent"
style="#style/sectionHeader"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/padding_small"
android:layout_marginTop="25dip"
android:gravity="right"
android:text="Note: " />
<EditText
android:id="#+id/note"
android:inputType="text"
style="#style/EditTextCalenderComp"
android:layout_width="#dimen/textbox"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/padding_small"
android:layout_marginRight="10dip"
android:layout_marginTop="25dip"
android:ems="10"
android:textColorHint="#cacaca"
/>
<Button
android:id="#+id/btnNextScreen"
android:background="#drawable/btn_toggle_holo_light_mosi"
android:layout_width="#dimen/btndim"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="10dip"
android:layout_marginTop="15dip"
android:text="Send to Next Screen" />
</LinearLayout>
**
I want a page which has a static header and footer with scrollable content inside. This is my layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<LinearLayout
android:id="#+id/headerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/sendfunds" />
</LinearLayout>
<ScrollView
android:id="#+id/scrollablContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="#+id/footerView"
android:layout_below="#+id/headerView" >
<RelativeLayout
android:id="#+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="30dp"
android:layout_marginTop="26dp"
android:text="Balance"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="8pt"
android:textStyle="bold" />
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView1"
android:layout_centerHorizontal="true"
android:text="TextView" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView2"
android:layout_alignBottom="#+id/textView2"
android:layout_marginLeft="16dp"
android:layout_toRightOf="#+id/textView2"
android:text="TextView" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/textView1"
android:layout_marginTop="34dp"
android:text="WHO ARE YOU SENDING MONEY TO?"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="8pt" />
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView4"
android:layout_marginTop="35dp"
android:text="Recipient Name"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText1"
android:layout_width="170dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView5"
android:layout_alignBottom="#+id/textView5"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText1"
android:layout_marginTop="25dp"
android:text="Recipient Email"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView6"
android:layout_alignBottom="#+id/textView6"
android:layout_alignLeft="#+id/editText1"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/editText2"
android:layout_marginTop="37dp"
android:text="HOW MUCH DO YOU WANT TO SEND?"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="8pt" />
<TextView
android:id="#+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView7"
android:layout_marginTop="34dp"
android:text="Amount"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView8"
android:layout_alignBottom="#+id/textView8"
android:layout_alignLeft="#+id/editText2"
android:layout_alignParentRight="true"
android:ems="10" >
<requestFocus />
</EditText>
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText3"
android:layout_marginTop="24dp"
android:text="Wallet Cat."
android:textAppearance="?android:attr/textAppearanceMedium" />
<Spinner
android:id="#+id/spinner1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editText3"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/textView9" />
<TextView
android:id="#+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView9"
android:layout_alignBottom="#+id/textView9"
android:layout_alignLeft="#+id/spinner1"
android:layout_marginLeft="22dp"
android:text="TextView"
android:visibility="gone" />
<TextView
android:id="#+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView9"
android:layout_marginTop="35dp"
android:text="Pay Ref."
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView11"
android:layout_alignLeft="#+id/spinner1"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView11"
android:layout_marginTop="27dp"
android:text="Detail Ref."
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView12"
android:layout_alignLeft="#+id/editText4"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView12"
android:layout_marginTop="39dp"
android:text="Date of Birth"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView13"
android:layout_alignLeft="#+id/editText5"
android:ems="10" />
<TextView
android:id="#+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView13"
android:layout_marginTop="40dp"
android:text="Password"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView14"
android:layout_alignLeft="#+id/editText6"
android:layout_alignParentRight="true"
android:ems="10" />
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/editText7"
android:layout_marginTop="37dp"
android:layout_toLeftOf="#+id/textView3"
android:text="Submit" />
</RelativeLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/footerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/wallet_ic" />
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView1"
android:src="#drawable/send_ic_hover" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView2"
android:src="#drawable/upload_ic" />
<ImageView
android:id="#+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView3"
android:src="#drawable/history1" />
<ImageView
android:id="#+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView4"
android:src="#drawable/more" />
</RelativeLayout>
</RelativeLayout>
With this I have the static header and footer but some of the scrollable content is missing. I tried increasing the height of the ScrollView and layout and fillViewport=true but no luck. How should I increase the height of the middle layout?
You can solve this by using a LinearLayout container instead of RelativeLayout container.
The container should have 3 children: Header, Content, and Footer. Where the Content's height is set to fill the remaining space. You can do that by using the weight attribute:
android:layout_height="0dp"
android:layout_weight="1"
Use this code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<LinearLayout
android:id="#+id/headerView"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/sendfunds" />
</LinearLayout>
<ScrollView
android:id="#+id/scrollablContent"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<RelativeLayout
android:id="#+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- Your Content -->
</RelativeLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/footerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/wallet_ic" />
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView1"
android:src="#drawable/send_ic_hover" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView2"
android:src="#drawable/upload_ic" />
<ImageView
android:id="#+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView3"
android:src="#drawable/history1" />
<ImageView
android:id="#+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView4"
android:src="#drawable/more" />
</RelativeLayout>
</LinearLayout>
Notice that using
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true
is meaningless within LinearLayout. So this:
<LinearLayout
android:id="#+id/headerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/sendfunds" />
</LinearLayout>
is wrong.
try this layout with small change in your layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<LinearLayout
android:id="#+id/headerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/sendfunds" />
</LinearLayout>
<RelativeLayout
android:id="#+id/footerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/wallet_ic" />
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView1"
android:src="#drawable/send_ic_hover" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView2"
android:src="#drawable/upload_ic" />
<ImageView
android:id="#+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView3"
android:src="#drawable/history1" />
<ImageView
android:id="#+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView4"
android:src="#drawable/more" />
</RelativeLayout>
<ScrollView
android:id="#+id/scrollablContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="#+id/footerView"
android:layout_below="#+id/headerView" >
<RelativeLayout
android:id="#+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="30dp"
android:layout_marginTop="26dp"
android:text="Balance"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="8pt"
android:textStyle="bold" />
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView1"
android:layout_centerHorizontal="true"
android:text="TextView" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView2"
android:layout_alignBottom="#+id/textView2"
android:layout_marginLeft="16dp"
android:layout_toRightOf="#+id/textView2"
android:text="TextView" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/textView1"
android:layout_marginTop="34dp"
android:text="WHO ARE YOU SENDING MONEY TO?"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="8pt" />
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView4"
android:layout_marginTop="35dp"
android:text="Recipient Name"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText1"
android:layout_width="170dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView5"
android:layout_alignBottom="#+id/textView5"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText1"
android:layout_marginTop="25dp"
android:text="Recipient Email"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView6"
android:layout_alignBottom="#+id/textView6"
android:layout_alignLeft="#+id/editText1"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/editText2"
android:layout_marginTop="37dp"
android:text="HOW MUCH DO YOU WANT TO SEND?"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="8pt" />
<TextView
android:id="#+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView7"
android:layout_marginTop="34dp"
android:text="Amount"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView8"
android:layout_alignBottom="#+id/textView8"
android:layout_alignLeft="#+id/editText2"
android:layout_alignParentRight="true"
android:ems="10" >
<requestFocus />
</EditText>
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText3"
android:layout_marginTop="24dp"
android:text="Wallet Cat."
android:textAppearance="?android:attr/textAppearanceMedium" />
<Spinner
android:id="#+id/spinner1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editText3"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/textView9" />
<TextView
android:id="#+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView9"
android:layout_alignBottom="#+id/textView9"
android:layout_alignLeft="#+id/spinner1"
android:layout_marginLeft="22dp"
android:text="TextView"
android:visibility="gone" />
<TextView
android:id="#+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView9"
android:layout_marginTop="35dp"
android:text="Pay Ref."
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView11"
android:layout_alignLeft="#+id/spinner1"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView11"
android:layout_marginTop="27dp"
android:text="Detail Ref."
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView12"
android:layout_alignLeft="#+id/editText4"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView12"
android:layout_marginTop="39dp"
android:text="Date of Birth"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView13"
android:layout_alignLeft="#+id/editText5"
android:ems="10" />
<TextView
android:id="#+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView13"
android:layout_marginTop="40dp"
android:text="Password"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView14"
android:layout_alignLeft="#+id/editText6"
android:layout_alignParentRight="true"
android:ems="10" />
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/editText7"
android:layout_marginTop="37dp"
android:layout_toLeftOf="#+id/textView3"
android:text="Submit" />
</RelativeLayout>
</ScrollView>
</RelativeLayout>
try this
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:orientation=”vertical” >
<LinearLayout
android:id="#+id/headerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/sendfunds" />
</LinearLayout>
<ScrollView
android:id="#+id/scrollablContent"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=1
>
<RelativeLayout
android:id="#+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="30dp"
android:layout_marginTop="26dp"
android:text="Balance"
android:textStyle="bold"
android:textSize="8pt"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView1"
android:layout_centerHorizontal="true"
android:text="TextView" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView2"
android:layout_alignBottom="#+id/textView2"
android:layout_marginLeft="16dp"
android:layout_toRightOf="#+id/textView2"
android:text="TextView" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/textView1"
android:layout_marginTop="34dp"
android:text="WHO ARE YOU SENDING MONEY TO?"
android:textSize="8pt"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView4"
android:layout_marginTop="35dp"
android:text="Recipient Name"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText1"
android:layout_width="170dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView5"
android:layout_alignBottom="#+id/textView5"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText1"
android:layout_marginTop="25dp"
android:text="Recipient Email"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView6"
android:layout_alignBottom="#+id/textView6"
android:layout_alignLeft="#+id/editText1"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/editText2"
android:layout_marginTop="37dp"
android:text="HOW MUCH DO YOU WANT TO SEND?"
android:textSize="8pt"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView7"
android:layout_marginTop="34dp"
android:text="Amount"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView8"
android:layout_alignBottom="#+id/textView8"
android:layout_alignLeft="#+id/editText2"
android:layout_alignParentRight="true"
android:ems="10" >
<requestFocus />
</EditText>
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/editText3"
android:layout_marginTop="24dp"
android:text="Wallet Cat."
android:textAppearance="?android:attr/textAppearanceMedium" />
<Spinner
android:id="#+id/spinner1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editText3"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/textView9" />
<TextView
android:id="#+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView9"
android:layout_alignBottom="#+id/textView9"
android:layout_alignLeft="#+id/spinner1"
android:layout_marginLeft="22dp"
android:text="TextView"
android:visibility="gone" />
<TextView
android:id="#+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView9"
android:layout_marginTop="35dp"
android:text="Pay Ref."
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView11"
android:layout_alignLeft="#+id/spinner1"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView11"
android:layout_marginTop="27dp"
android:text="Detail Ref."
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView12"
android:layout_alignLeft="#+id/editText4"
android:layout_alignParentRight="true"
android:ems="10" />
<TextView
android:id="#+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView12"
android:layout_marginTop="39dp"
android:text="Date of Birth"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView13"
android:layout_alignLeft="#+id/editText5"
android:ems="10" />
<TextView
android:id="#+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/textView13"
android:layout_marginTop="40dp"
android:text="Password"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="#+id/editText7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/textView14"
android:layout_alignLeft="#+id/editText6"
android:layout_alignParentRight="true"
android:ems="10" />
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/editText7"
android:layout_marginTop="37dp"
android:layout_toLeftOf="#+id/textView3"
android:text="Submit" />
</RelativeLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/footerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/wallet_ic" />
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView1"
android:src="#drawable/send_ic_hover" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#+id/imageView2"
android:src="#drawable/upload_ic" />
<ImageView
android:id="#+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView3"
android:src="#drawable/history1" />
<ImageView
android:id="#+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="#+id/imageView4"
android:src="#drawable/more" />
</RelativeLayout>
</LinearLayout >