my application Screen position chang after click my custum dialog button - android

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>
**

Related

Design of android xml layout

I trying to design android listView like image below
But I get this
How to make the timeOut display beside timeIn and have a line between timeIn and timeOut ? Thanks.
xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="6dip">
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Description : "
android:layout_below="#+id/textView3"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView2"
android:layout_below="#+id/Project"
android:text=" Progress : "/>
<TextView
android:id="#+id/Project"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#color/black"
android:textStyle="bold"
android:text=" Project "
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<TextView
android:id="#+id/Description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView2"
android:layout_alignBottom="#+id/textView2"
android:layout_toRightOf="#+id/textView2"
android:text="TextView" />
<TextView
android:id="#+id/Percentage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView3"
android:layout_alignBottom="#+id/textView3"
android:layout_toRightOf="#+id/textView3"
android:text="TextView" />
<TextView
android:id="#+id/in"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TimeIn"
android:paddingLeft="80dp"
android:layout_toRightOf="#+id/Project"
android:layout_alignParentRight="true"
android:layout_marginRight="64dp" />
<TextView
android:id="#+id/out"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TimeOut"
android:layout_toRightOf="#+id/in"
android:layout_alignParentRight="true" />
</RelativeLayout>
Please try this xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="#dimen/activity_horizontal_margin">
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/textView3"
android:text="Description : "/>
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView2"
android:layout_below="#+id/Project"
android:text="Progress : "/>
<TextView
android:id="#+id/Project"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:text="Project "
android:textColor="#color/colorBlack"
android:textStyle="bold"/>
<TextView
android:id="#+id/Description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView2"
android:layout_alignBottom="#+id/textView2"
android:layout_toRightOf="#+id/textView2"
android:text="TextView"/>
<TextView
android:id="#+id/Percentage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView3"
android:layout_alignBottom="#+id/textView3"
android:layout_toRightOf="#+id/textView3"
android:text="TextView"/>
<TextView
android:id="#+id/in"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="#+id/out"
android:text="TimeIn | "/>
<TextView
android:id="#+id/out"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="TimeOut"/>
</RelativeLayout>
Hope it will help..!!
You are using android:layout_alignParentRight="true" for both your #+id/out and #+id/in TextViews.
Use it only for the one that would appear on the right, which in your case is timeOut. Timein TextView should use android:layout_toLeftOf of timeout TextView.
If you want to use a line between them, you can either use another TextView with "|" between them, or you can draw a View there.
Try this
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="#android:color/darker_gray"
android:padding="6dip">
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/textView3"
android:text=" Description : "
android:textColor="#android:color/black" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView2"
android:layout_below="#+id/Project"
android:text=" Progress : "
android:textColor="#android:color/black" />
<TextView
android:id="#+id/Project"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:text=" Project "
android:textColor="#android:color/black"
android:textStyle="bold" />
<TextView
android:id="#+id/Description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView2"
android:layout_alignBottom="#+id/textView2"
android:layout_toRightOf="#+id/textView2"
android:text="TextView"
android:textColor="#android:color/black" />
<TextView
android:id="#+id/Percentage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/textView3"
android:layout_alignBottom="#+id/textView3"
android:layout_toRightOf="#+id/textView3"
android:text="TextView"
android:textColor="#android:color/black" />
<LinearLayout
android:id="#+id/container"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="#+id/in"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="#+id/line"
android:text="TimeIn"
android:textColor="#android:color/black" />
<LinearLayout
android:id="#+id/line"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_toLeftOf="#+id/out"
android:background="#android:color/black"
android:orientation="horizontal">
</LinearLayout>
<TextView
android:id="#+id/out"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="TimeOut"
android:textColor="#android:color/black" />
</LinearLayout>
</RelativeLayout>
Output of this code
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="6dip">
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/textView3"
android:text=" Description : " />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView2"
android:layout_below="#+id/Project"
android:text=" Progress : " />
<TextView
android:id="#+id/Project"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:text=" Project "
android:textStyle="bold" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:orientation="horizontal">
<TextView
android:id="#+id/in"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TimeIn" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" | " />
<TextView
android:id="#+id/out"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TimeOut" />
</LinearLayout>

Scrollview doesnot appears after putting it in xml file in android

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>

How to use scroll view in relative layout which exist in fragment?

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>

RelativeLayout in ScrollView won't scroll

I'm working on my first android app and I'm trying to get everything to scroll except for the ad. I put everything except for the ad into a RelativeLayout and put that into a ScrollView. When I click on an EditText and the keyboard comes up everything in the ScrollView gets shifted up but I can't scroll.
Code is:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/background"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
android:paddingBottom="#dimen/activity_vertical_margin"
tools:context="com.example.tipcalculator.app.MainActivity">
<com.google.android.gms.ads.AdView android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="*adId*"
ads:adSize="BANNER"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
android:layout_below="#+id/adView">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true">
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number|numberDecimal"
android:ems="10"
android:id="#+id/tipTxt"
android:editable="true"
android:clickable="true"
android:hint="Other"
android:layout_alignBottom="#+id/tipOthr"
android:layout_toRightOf="#+id/tipOthr"
android:enabled="false" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number|numberDecimal"
android:ems="10"
android:id="#+id/priceTxt"
android:editable="true"
android:clickable="true"
android:hint="Price"
android:enabled="true"
android:layout_above="#+id/splitInTxt"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:id="#+id/splitTxt"
android:layout_marginBottom="22dp"
android:editable="false"
android:clickable="false"
android:layout_alignParentBottom="true"
android:layout_alignLeft="#+id/totalTxt"
android:layout_alignStart="#+id/totalTxt"
android:gravity="center_vertical"
android:text="$0.00"
android:textAlignment="center" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Calculate Tip"
android:id="#+id/calcBtn"
android:enabled="false"
android:layout_marginBottom="29dp"
android:clickable="true"
android:gravity="center_vertical"
android:layout_above="#+id/totalTxt"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:id="#+id/totalTxt"
android:editable="false"
android:clickable="false"
android:gravity="center_vertical"
android:text="$0.00"
android:textAlignment="center"
android:layout_alignBottom="#+id/textView2"
android:layout_alignLeft="#+id/ tipOutTxt "
android:layout_alignStart="#+id/ tipOutTxt " />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="10%"
android:id="#+id/tipTen"
android:checked="false"
android:clickable="true"
android:enabled="true"
android:layout_above="#+id/tipFtn"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="15%"
android:id="#+id/tipFtn"
android:checked="false"
android:clickable="true"
android:enabled="true"
android:layout_above="#+id/tipTnty"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="20%"
android:id="#+id/tipTnty"
android:checked="false"
android:clickable="true"
android:enabled="true"
android:layout_above="#+id/tipTxt"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/tipOthr"
android:checked="false"
android:layout_above="#+id/calcBtn"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginBottom="29dp"
android:clickable="true"
android:enabled="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Total"
android:id="#+id/textView2"
android:layout_above="#+id/splitTxt"
android:layout_alignRight="#+id/textView3"
android:layout_alignEnd="#+id/textView3" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Split"
android:id="#+id/textView3"
android:layout_alignBottom="#+id/splitTxt"
android:layout_alignRight="#+id/textView5"
android:layout_alignEnd="#+id/textView5" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Split"
android:id="#+id/textView"
android:longClickable="false"
android:singleLine="true"
android:layout_above="#+id/tipTen"
android:layout_toLeftOf="#+id/minusBtn" />
<EditText
android:layout_width="76dp"
android:layout_height="wrap_content"
android:inputType="number"
android:ems="10"
android:id="#+id/splitInTxt"
android:text="1"
android:enabled="true"
android:editable="true"
android:gravity="center|right"
android:layout_above="#+id/tipTen"
android:layout_centerHorizontal="true" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="40dp"
android:layout_height="40dp"
android:text="+"
android:id="#+id/plusBtn"
android:enabled="true"
android:clickable="true"
android:layout_alignBottom="#+id/splitInTxt"
android:layout_alignRight="#+id/tipTxt"
android:layout_alignEnd="#+id/tipTxt" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="40dp"
android:layout_height="40dp"
android:text="-"
android:id="#+id/minusBtn"
android:clickable="true"
android:enabled="true"
android:layout_alignBottom="#+id/splitInTxt"
android:layout_toLeftOf="#+id/splitInTxt" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:id="#+id/ tipOutTxt "
android:editable="false"
android:clickable="false"
android:gravity="center_vertical"
android:text="$0.00"
android:textAlignment="center"
android:layout_alignBottom="#+id/textView5"
android:layout_centerHorizontal="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Tip"
android:id="#+id/textView5"
android:layout_above="#+id/totalTxt"
android:layout_toRightOf="#+id/tipOthr" />
</RelativeLayout>
</ScrollView>
</RelativeLayout>
// Try this way,hope this will help you to solve your problem...
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/background"
android:gravity="center"
android:orientation="vertical"
tools:context="com.example.tipcalculator.app.MainActivity">
<com.google.android.gms.ads.AdView
android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="*adId*"
ads:adSize="BANNER" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number|numberDecimal"
android:ems="10"
android:id="#+id/tipTxt"
android:editable="true"
android:clickable="true"
android:hint="Other"
android:layout_alignBottom="#+id/tipOthr"
android:layout_toRightOf="#+id/tipOthr"
android:enabled="false" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number|numberDecimal"
android:ems="10"
android:id="#+id/priceTxt"
android:editable="true"
android:clickable="true"
android:hint="Price"
android:enabled="true"
android:layout_above="#+id/splitInTxt"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:id="#+id/splitTxt"
android:layout_marginBottom="22dp"
android:editable="false"
android:clickable="false"
android:layout_alignParentBottom="true"
android:layout_alignLeft="#+id/totalTxt"
android:layout_alignStart="#+id/totalTxt"
android:gravity="center_vertical"
android:text="$0.00"
android:textAlignment="center" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Calculate Tip"
android:id="#+id/calcBtn"
android:enabled="false"
android:layout_marginBottom="29dp"
android:clickable="true"
android:gravity="center_vertical"
android:layout_above="#+id/totalTxt"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:id="#+id/totalTxt"
android:editable="false"
android:clickable="false"
android:gravity="center_vertical"
android:text="$0.00"
android:textAlignment="center"
android:layout_alignBottom="#+id/textView2"
android:layout_alignLeft="#+id/ tipOutTxt "
android:layout_alignStart="#+id/ tipOutTxt " />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="10%"
android:id="#+id/tipTen"
android:checked="false"
android:clickable="true"
android:enabled="true"
android:layout_above="#+id/tipFtn"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="15%"
android:id="#+id/tipFtn"
android:checked="false"
android:clickable="true"
android:enabled="true"
android:layout_above="#+id/tipTnty"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="20%"
android:id="#+id/tipTnty"
android:checked="false"
android:clickable="true"
android:enabled="true"
android:layout_above="#+id/tipTxt"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/tipOthr"
android:checked="false"
android:layout_above="#+id/calcBtn"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginBottom="29dp"
android:clickable="true"
android:enabled="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Total"
android:id="#+id/textView2"
android:layout_above="#+id/splitTxt"
android:layout_alignRight="#+id/textView3"
android:layout_alignEnd="#+id/textView3" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Split"
android:id="#+id/textView3"
android:layout_alignBottom="#+id/splitTxt"
android:layout_alignRight="#+id/textView5"
android:layout_alignEnd="#+id/textView5" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Split"
android:id="#+id/textView"
android:longClickable="false"
android:singleLine="true"
android:layout_above="#+id/tipTen"
android:layout_toLeftOf="#+id/minusBtn" />
<EditText
android:layout_width="76dp"
android:layout_height="wrap_content"
android:inputType="number"
android:ems="10"
android:id="#+id/splitInTxt"
android:text="1"
android:enabled="true"
android:editable="true"
android:gravity="center|right"
android:layout_above="#+id/tipTen"
android:layout_centerHorizontal="true" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="40dp"
android:layout_height="40dp"
android:text="+"
android:id="#+id/plusBtn"
android:enabled="true"
android:clickable="true"
android:layout_alignBottom="#+id/splitInTxt"
android:layout_alignRight="#+id/tipTxt"
android:layout_alignEnd="#+id/tipTxt" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="40dp"
android:layout_height="40dp"
android:text="-"
android:id="#+id/minusBtn"
android:clickable="true"
android:enabled="true"
android:layout_alignBottom="#+id/splitInTxt"
android:layout_toLeftOf="#+id/splitInTxt" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:id="#+id/ tipOutTxt "
android:editable="false"
android:clickable="false"
android:gravity="center_vertical"
android:text="$0.00"
android:textAlignment="center"
android:layout_alignBottom="#+id/textView5"
android:layout_centerHorizontal="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Tip"
android:id="#+id/textView5"
android:layout_above="#+id/totalTxt"
android:layout_toRightOf="#+id/tipOthr" />
</RelativeLayout>
</ScrollView>
</LinearLayout>
I figured out some possible problem of RelativeLayout you have used in Scrollview.
You just need to use RelativeLayout like :
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
There is no meaning of using android:layout_alignParentEnd="true" and
android:layout_alignParentTop="true" at a same time.
Let me know in case it helps. :)
Edit: Set ScollView height to wrap_content.
Try this,Wrap your relative layout within linear layout.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="#+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF"
android:orientation="vertical" >
<com.google.android.gms.ads.AdView android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="*adId*"
ads:adSize="BANNER"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
android:layout_below="#+id/adView">
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number|numberDecimal"
android:ems="10"
android:id="#+id/tipTxt"
android:editable="true"
android:clickable="true"
android:hint="Other"
android:layout_alignBottom="#+id/tipOthr"
android:layout_toRightOf="#+id/tipOthr"
android:enabled="false" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number|numberDecimal"
android:ems="10"
android:id="#+id/priceTxt"
android:editable="true"
android:clickable="true"
android:hint="Price"
android:enabled="true"
android:layout_above="#+id/splitInTxt"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:id="#+id/splitTxt"
android:layout_marginBottom="22dp"
android:editable="false"
android:clickable="false"
android:layout_alignParentBottom="true"
android:layout_alignLeft="#+id/totalTxt"
android:layout_alignStart="#+id/totalTxt"
android:gravity="center_vertical"
android:text="$0.00"
android:textAlignment="center" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Calculate Tip"
android:id="#+id/calcBtn"
android:enabled="false"
android:layout_marginBottom="29dp"
android:clickable="true"
android:gravity="center_vertical"
android:layout_above="#+id/totalTxt"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:id="#+id/totalTxt"
android:editable="false"
android:clickable="false"
android:gravity="center_vertical"
android:text="$0.00"
android:textAlignment="center"
android:layout_alignBottom="#+id/textView2"
android:layout_alignLeft="#+id/ tipOutTxt "
android:layout_alignStart="#+id/ tipOutTxt " />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="10%"
android:id="#+id/tipTen"
android:checked="false"
android:clickable="true"
android:enabled="true"
android:layout_above="#+id/tipFtn"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="15%"
android:id="#+id/tipFtn"
android:checked="false"
android:clickable="true"
android:enabled="true"
android:layout_above="#+id/tipTnty"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="20%"
android:id="#+id/tipTnty"
android:checked="false"
android:clickable="true"
android:enabled="true"
android:layout_above="#+id/tipTxt"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/tipOthr"
android:checked="false"
android:layout_above="#+id/calcBtn"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginBottom="29dp"
android:clickable="true"
android:enabled="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Total"
android:id="#+id/textView2"
android:layout_above="#+id/splitTxt"
android:layout_alignRight="#+id/textView3"
android:layout_alignEnd="#+id/textView3" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Split"
android:id="#+id/textView3"
android:layout_alignBottom="#+id/splitTxt"
android:layout_alignRight="#+id/textView5"
android:layout_alignEnd="#+id/textView5" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Split"
android:id="#+id/textView"
android:longClickable="false"
android:singleLine="true"
android:layout_above="#+id/tipTen"
android:layout_toLeftOf="#+id/minusBtn" />
<EditText
android:layout_width="76dp"
android:layout_height="wrap_content"
android:inputType="number"
android:ems="10"
android:id="#+id/splitInTxt"
android:text="1"
android:enabled="true"
android:editable="true"
android:gravity="center|right"
android:layout_above="#+id/tipTen"
android:layout_centerHorizontal="true" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="40dp"
android:layout_height="40dp"
android:text="+"
android:id="#+id/plusBtn"
android:enabled="true"
android:clickable="true"
android:layout_alignBottom="#+id/splitInTxt"
android:layout_alignRight="#+id/tipTxt"
android:layout_alignEnd="#+id/tipTxt" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="40dp"
android:layout_height="40dp"
android:text="-"
android:id="#+id/minusBtn"
android:clickable="true"
android:enabled="true"
android:layout_alignBottom="#+id/splitInTxt"
android:layout_toLeftOf="#+id/splitInTxt" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:id="#+id/ tipOutTxt "
android:editable="false"
android:clickable="false"
android:gravity="center_vertical"
android:text="$0.00"
android:textAlignment="center"
android:layout_alignBottom="#+id/textView5"
android:layout_centerHorizontal="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Tip"
android:id="#+id/textView5"
android:layout_above="#+id/totalTxt"
android:layout_toRightOf="#+id/tipOthr" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
To fix header and footer with scrollview you may refer this link http://www.javacodegeeks.com/2013/10/android-fixed-header-and-footer-with-scrollable-content-layout-example.html

when click in EditText numberpad comes with footer layout

I have made a simple android activity with some edit texts and some TextVies and "header" and "footer" layouts,Now all is working well,but at runtime ,when i click on any on EditText the numberpad popups and comes with my "footer" layout.I have put my activity image below so that you can get my problem,My code is as below:
main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="#+id/relativeLayout2"
android:layout_width="fill_parent"
android:layout_height="56dp"
android:padding="3dp" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="General Details"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<Button
android:id="#+id/back1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:text="Back" />
<Button
android:id="#+id/Next1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:text="Next" />
</RelativeLayout>
<SeekBar
android:id="#+id/seekBar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_weight="0.23" android:fillViewport="true">
<RelativeLayout
android:id="#+id/relativeLayout2"
android:layout_width="fill_parent"
android:layout_height="509dp"
android:background="#fffff3"
android:padding="10dp" >
<EditText
android:id="#+id/editTextPropertyCalc1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editTextPropertyCalc2"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:inputType="numberDecimal" android:imeOptions="actionNext">
</EditText>
<EditText
android:id="#+id/editTextPropertyCalc2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/editTextPropertyCalc1"
android:layout_toRightOf="#+id/imageButtonCalcTip2"
android:inputType="numberDecimal" android:imeOptions="actionDone"/>
<EditText
android:id="#+id/editTextPropertyCalc3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editTextPropertyCalc1"
android:layout_alignParentRight="true"
android:layout_below="#+id/editTextPropertyCalc2"
android:inputType="numberDecimal" android:enabled="false" android:focusableInTouchMode="false" android:focusable="false"/>
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/editTextPropertyCalc3"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/editTextPropertyCalc3"
android:textAppearance="?android:attr/textAppearanceMediumInverse"
android:typeface="serif" />
<EditText
android:id="#+id/editTextPropertyCalc4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editTextPropertyCalc3"
android:layout_alignRight="#+id/textView2"
android:layout_below="#+id/textView2"
android:inputType="numberDecimal" android:imeOptions="actionNext"/>
<EditText
android:id="#+id/editTextPropertyCalc5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editTextPropertyCalc4"
android:layout_alignRight="#+id/textView2"
android:layout_below="#+id/editTextPropertyCalc4"
android:inputType="numberDecimal" android:imeOptions="actionNext"/>
<EditText
android:id="#+id/editTextPropertyCalc6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editTextPropertyCalc4"
android:layout_alignParentRight="true"
android:layout_below="#+id/editTextPropertyCalc5"
android:inputType="numberDecimal" android:imeOptions="actionNext"/>
<EditText
android:id="#+id/editTextPropertyCalc7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editTextPropertyCalc5"
android:layout_alignParentRight="true"
android:layout_below="#+id/editTextPropertyCalc6"
android:inputType="numberDecimal" android:imeOptions="actionDone"/>
<EditText
android:id="#+id/editTextPropertyCalc8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editTextPropertyCalc6"
android:layout_alignParentRight="true"
android:layout_below="#+id/editTextPropertyCalc7"
android:inputType="numberDecimal" android:enabled="false" android:focusableInTouchMode="false" android:focusable="false"/>
<Button
android:id="#+id/buttonPropertyCalcClear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/togglebutton"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="Clear All" />
<TextView
android:id="#+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/editTextPropertyCalc1"
android:layout_alignBottom="#+id/editTextPropertyCalc1"
android:layout_alignLeft="#+id/textView2"
android:text="Purchase Price"
android:textAppearance="?android:attr/textAppearanceSmallInverse"
android:typeface="serif" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/editTextPropertyCalc2"
android:layout_alignParentLeft="true"
android:layout_alignTop="#+id/imageButtonCalcTip2"
android:text="Refurnishment Cost"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceSmallInverse"
android:typeface="serif" />
<TextView
android:id="#+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/editTextPropertyCalc3"
android:layout_alignBottom="#+id/editTextPropertyCalc3"
android:layout_alignLeft="#+id/textView2"
android:text="Legal Cost"
android:textAppearance="?android:attr/textAppearanceSmallInverse"
android:typeface="serif" />
<TextView
android:id="#+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/editTextPropertyCalc4"
android:layout_alignBottom="#+id/editTextPropertyCalc4"
android:layout_alignParentLeft="true"
android:layout_alignRight="#+id/textView3"
android:text="Mortage Loan to Value(LTV)% "
android:textAppearance="?android:attr/textAppearanceSmallInverse"
android:typeface="serif" />
<TextView
android:id="#+id/TextView04"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/editTextPropertyCalc5"
android:layout_alignBottom="#+id/editTextPropertyCalc5"
android:layout_alignParentLeft="true"
android:layout_alignRight="#+id/TextView02"
android:text="Mortage Interest Rate %"
android:textAppearance="?android:attr/textAppearanceSmallInverse"
android:typeface="serif" />
<TextView
android:id="#+id/TextView05"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/editTextPropertyCalc6"
android:layout_alignBottom="#+id/editTextPropertyCalc6"
android:layout_alignParentLeft="true"
android:text="Monthly Rent"
android:textAppearance="?android:attr/textAppearanceSmallInverse"
android:typeface="serif" />
<TextView
android:id="#+id/TextView06"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/editTextPropertyCalc7"
android:layout_alignBottom="#+id/editTextPropertyCalc7"
android:layout_alignParentLeft="true"
android:text="Letting Agent Fees"
android:textAppearance="?android:attr/textAppearanceSmallInverse"
android:typeface="serif" />
<TextView
android:id="#+id/TextView07"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/editTextPropertyCalc8"
android:layout_alignLeft="#+id/TextView06"
android:layout_alignRight="#+id/TextView04"
android:layout_below="#+id/imageButtonCalcTip7"
android:text="Montlhly Operating Expenses %"
android:textAppearance="?android:attr/textAppearanceSmallInverse"
android:typeface="serif" />
<TextView
android:id="#+id/TextView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="390dp"
android:layout_marginRight="180dp"
android:text="Will you be borrowing any of the deposit money?"
android:textAppearance="?android:attr/textAppearanceSmallInverse"
android:typeface="serif" />
/>
<ImageButton
android:id="#+id/imageButtonCalcTip1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/editTextPropertyCalc1"
android:layout_alignTop="#+id/editTextPropertyCalc1"
android:layout_toRightOf="#+id/TextView02"
android:background="#0000"
android:padding="10dp"
android:scaleType="fitCenter"
android:src="#android:drawable/ic_dialog_info" />
<ImageButton
android:id="#+id/imageButtonCalcTip2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/editTextPropertyCalc2"
android:layout_alignTop="#+id/editTextPropertyCalc2"
android:layout_toRightOf="#+id/TextView02"
android:background="#0000"
android:padding="10dp"
android:scaleType="fitCenter"
android:src="#android:drawable/ic_dialog_info" />
<ImageButton
android:id="#+id/imageButtonCalcTip3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/editTextPropertyCalc3"
android:layout_alignTop="#+id/editTextPropertyCalc3"
android:layout_toRightOf="#+id/TextView02"
android:background="#0000"
android:padding="10dp"
android:scaleType="fitCenter"
android:src="#android:drawable/ic_dialog_info" />
<ImageButton
android:id="#+id/imageButtonCalcTip4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/editTextPropertyCalc4"
android:layout_alignTop="#+id/editTextPropertyCalc4"
android:layout_toRightOf="#+id/TextView02"
android:background="#0000"
android:padding="10dp"
android:scaleType="fitCenter"
android:src="#android:drawable/ic_dialog_info" />
<ImageButton
android:id="#+id/imageButtonCalcTip5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/editTextPropertyCalc5"
android:layout_alignTop="#+id/editTextPropertyCalc5"
android:layout_toRightOf="#+id/TextView02"
android:background="#0000"
android:padding="10dp"
android:scaleType="fitCenter"
android:src="#android:drawable/ic_dialog_info" />
<ImageButton
android:id="#+id/imageButtonCalcTip7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/editTextPropertyCalc7"
android:layout_alignTop="#+id/editTextPropertyCalc7"
android:layout_toRightOf="#+id/TextView02"
android:background="#0000"
android:padding="10dp"
android:scaleType="fitCenter"
android:src="#android:drawable/ic_dialog_info" />
<ImageButton
android:id="#+id/imageButtonCalcTip8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/editTextPropertyCalc8"
android:layout_alignTop="#+id/editTextPropertyCalc8"
android:layout_toRightOf="#+id/TextView02"
android:background="#0000"
android:padding="10dp"
android:scaleType="fitCenter"
android:src="#android:drawable/ic_dialog_info" />
<Button
android:id="#+id/buttonMortgageAmount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/editTextPropertyCalc3"
android:layout_alignLeft="#+id/editTextPropertyCalc3"
android:layout_alignRight="#+id/editTextPropertyCalc3"
android:layout_alignTop="#+id/editTextPropertyCalc3" android:background="#0000"/>
<ToggleButton
android:id="#+id/togglebutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="250dp"
android:layout_marginLeft="200dp"
android:layout_below="#+id/editTextPropertyCalc3"
android:textOff="No"
android:textOn="Yes" />
</RelativeLayout>
**</ScrollView>**
<LinearLayout
android:id="#+id/linearLayout3"
android:layout_width="fill_parent"
android:layout_height="46dp"
android:background="#drawable/gradient_grey" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1" android:orientation="vertical">
<ImageButton
android:id="#+id/imageButtonHome"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="#drawable/g3570" android:layout_weight="0.6" android:background="#0000" android:scaleType="fitCenter" android:layout_marginTop="5dp"/>
<TextView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="Home"
android:gravity="center" android:textAppearance="?android:attr/textAppearanceMediumInverse" android:textColor="#fff" android:textStyle="bold"/>
</LinearLayout> <LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1" android:orientation="vertical">
<ImageButton
android:id="#+id/imageButtonTraining"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="#drawable/g4404" android:layout_weight="0.6" android:scaleType="fitCenter" android:background="#0000" android:layout_marginTop="5dp"/>
<TextView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="Training"
android:gravity="center" android:textAppearance="?android:attr/textAppearanceMediumInverse" android:textColor="#fff" android:textStyle="bold"/>
</LinearLayout> <LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1" android:orientation="vertical">
<ImageButton
android:id="#+id/imageButtonContactUs"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="#drawable/icon_email" android:layout_weight="0.6" android:scaleType="fitCenter" android:background="#0000" android:layout_marginTop="5dp"/>
<TextView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="Contact Us"
android:gravity="center" android:textAppearance="?android:attr/textAppearanceMediumInverse" android:textColor="#fff" android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
My image of Activity is as below:
Please help me for my this error .thank you friends.
Try this code this is worked for me...
public class Calculator extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.calculator);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
}
Use this code below this will help you...
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
or Use this code
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".Main"
android:label="#string/app_name"
android:windowSoftInputMode="stateHidden"
>
Sorry for late
In my case, I have added these lines of code below in the Oncreate function and top of the Layout
like below
code is here:
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN)

Categories

Resources