Error in R.java due to an XML file - android

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

Problem is with this
<EditText
android:id="#+id/0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:hint="A/C Number"
android:textSize="10sp" />
Do this
<EditText
android:id="#+id/EditText0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10"
android:hint="A/C Number"
android:textSize="10sp" />
Always follow naming conventions Never start any id with Numbers
After changing this You can Clean and Rebuild the project

id cannot start with a digit or a symbol except _

Related

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>

when keyboard is open layout should move above in android

I want to move my layout above when keyboard is on. I have tried with android:windowSoftInputMode="adjustPan|adjustResize". But this is not working.
When I click on EditText it should move above so that the TextView should be visible.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".EnterPin" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#drawable/top_bar"
android:padding="3dp" >
<Button
android:id="#+id/btn_home_change_pin"
android:layout_width="45dp"
android:layout_height="28dp"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp"
android:background="#drawable/grey_btn_selector"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:text="Home"
android:textColor="#417883"
android:textSize="11sp" />
<TextView
android:id="#+id/txt_company_name_check_in"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="BURBLE ME"
android:textColor="#FFFFFF"
android:textSize="14sp"
android:textStyle="bold" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingLeft="10dp"
android:text="Thank you for claiming your account"
android:textColor="#5DA5AE"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="9dp"
android:layout_marginLeft="5dp"
android:text="Now please enter a PIN.You will use this to allow other Burble enables Dropzones to import you."
android:textSize="14dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="18dp" >
<EditText
android:id="#+id/edt_current_pin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="9dp"
android:background="#drawable/edittext_shape"
android:ems="10"
android:hint="Enter Pin"
android:padding="10dp"
android:textSize="14sp"
android:gravity="center_horizontal"
android:inputType="numberPassword"
android:singleLine="true" >
</EditText>
<EditText
android:id="#+id/edt_confirm_pin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="9dp"
android:background="#drawable/edittext_shape"
android:ems="10"
android:hint="Confirm Pin"
android:padding="10dp"
android:textSize="14sp"
android:gravity="center_horizontal"
android:inputType="numberPassword"
android:singleLine="true" >
</EditText>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="15dp"
android:weightSum="2" >
<Button
android:id="#+id/btn_pin_back"
android:layout_width="0dp"
android:layout_height="42dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_weight="1"
android:background="#drawable/button_selector"
android:shadowColor="#ffffff"
android:shadowDx="1.5"
android:shadowDy="2"
android:shadowRadius="2"
android:text="Back"
android:textSize="15dp" />
<Button
android:id="#+id/btn_change_pin"
android:layout_width="0dp"
android:layout_height="42dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_weight="1"
android:background="#drawable/button_selector"
android:shadowColor="#ffffff"
android:shadowDx="1.5"
android:shadowDy="2"
android:shadowRadius="2"
android:text="Next"
android:textSize="15dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="10dp"
android:text="What will I use this for?"
android:textSize="12dp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="10dp"
android:text="You will use your PIN at your dropzone to manifest using their equipment and to allow a new dropzone to add you to their Burble system."
android:textSize="12dp" />
</LinearLayout>
</LinearLayout>
Add this line of code in manifest activity declaration.
<activity
android:name=".ACTIVITY NAME"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateUnchanged|adjustResize"/>
Add this lines in your AndroidManifest.xml
android:windowSoftInputMode="adjustPan"
here is your layout .
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="3dp" >
<Button
android:id="#+id/btn_home_change_pin"
android:layout_width="45dp"
android:layout_height="28dp"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:text="Home"
android:textColor="#417883"
android:textSize="11sp" />
<TextView
android:id="#+id/txt_company_name_check_in"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="BURBLE ME"
android:textColor="#FFFFFF"
android:textSize="14sp"
android:textStyle="bold" />
</RelativeLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="none" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:paddingLeft="10dp"
android:text="Thank you for claiming your account"
android:textColor="#5DA5AE"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="5dp"
android:layout_marginTop="9dp"
android:text="Now please enter a PIN.You will use this to allow other Burble enables Dropzones to import you."
android:textSize="14dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="18dp" >
<EditText
android:id="#+id/edt_current_pin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="9dp"
android:ems="10"
android:gravity="center_horizontal"
android:hint="Enter Pin"
android:inputType="numberPassword"
android:padding="10dp"
android:singleLine="true"
android:textSize="14sp" >
</EditText>
<EditText
android:id="#+id/edt_confirm_pin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="9dp"
android:ems="10"
android:gravity="center_horizontal"
android:hint="Confirm Pin"
android:inputType="numberPassword"
android:padding="10dp"
android:singleLine="true"
android:textSize="14sp" >
</EditText>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="15dp"
android:weightSum="2" >
<Button
android:id="#+id/btn_pin_back"
android:layout_width="0dp"
android:layout_height="42dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_weight="1"
android:shadowColor="#ffffff"
android:shadowDx="1.5"
android:shadowDy="2"
android:shadowRadius="2"
android:text="Back"
android:textSize="15dp" />
<Button
android:id="#+id/btn_change_pin"
android:layout_width="0dp"
android:layout_height="42dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_weight="1"
android:shadowColor="#ffffff"
android:shadowDx="1.5"
android:shadowDy="2"
android:shadowRadius="2"
android:text="Next"
android:textSize="15dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="10dp"
android:text="What will I use this for?"
android:textSize="12dp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="10dp"
android:text="You will use your PIN at your dropzone to manifest using their equipment and to allow a new dropzone to add you to their Burble system."
android:textSize="12dp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
Add the line below to the activity this layout is inflated in. (AndroidManifest.xml) android:windowSoftInputMode="stateUnchanged|adjustPan"

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

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

view the two buttons side by side

I have two buttons Login and Scan. I want these buttons to be in a horizontal way just like in a single row. I tied making the layout horizontal. However it does not work. They should appear side by side. My code is as follows.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/imagesand"
android:orientation="vertical"
tools:context=".MainActivity" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="5dp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/imagesand"
android:gravity="center"
android:orientation="vertical" >
<LinearLayout
android:layout_width="207dp"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:background="#drawable/loginbg"
android:gravity="center"
android:orientation="vertical"
android:layout_alignParentBottom="true"
android:paddingLeft="20dp"
android:paddingRight="20dp" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="User Name"
android:textAppearance="#android:style/TextAppearance.Medium" />
<EditText
android:id="#+id/emailid"
android:layout_width="156dp"
android:layout_height="45dp"
android:layout_marginTop="5dp"
android:background="#drawable/button"
android:hint="User Name"
android:inputType="text"
android:paddingLeft="10dp"
android:textAppearance="#android:style/TextAppearance.Medium" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="Password"
android:textAppearance="#android:style/TextAppearance.Medium" />
<EditText
android:id="#+id/password"
android:layout_width="156dp"
android:layout_height="45dp"
android:layout_marginTop="5dp"
android:background="#drawable/button"
android:hint="Password"
android:inputType="textPassword"
android:paddingLeft="10dp"
android:textAppearance="#android:style/TextAppearance.Medium" />
<Button
android:id="#+id/login"
android:layout_width="71dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:background="#drawable/login"
android:text="Login"
android:textAppearance="#android:style/TextAppearance.Medium"
android:textColor="#000000"
android:typeface="serif" />
<Button android:id="#+id/scan"
and
android:layout_width="71dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:background="#drawable/login"
android:text="scan"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Just put both button in LinearLayout whose orientation must be horizontal
Simple use this..
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="#+id/textView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="left|center"
android:layout_weight="1"
android:text="Login"
android:textColor="#000000" />
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_weight="1"
android:text="Scan"
android:textColor="#000000" />
</LinearLayout>
</LinearLayout>
Use this code:
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="5dp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/imagesand"
android:gravity="center"
android:orientation="vertical" >
<LinearLayout
android:layout_width="207dp"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:background="#drawable/loginbg"
android:gravity="center"
android:orientation="vertical"
android:layout_alignParentBottom="true"
android:paddingLeft="20dp"
android:paddingRight="20dp" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="User Name"
android:textAppearance="#android:style/TextAppearance.Medium" />
<EditText
android:id="#+id/emailid"
android:layout_width="156dp"
android:layout_height="45dp"
android:layout_marginTop="5dp"
android:background="#drawable/button"
android:hint="User Name"
android:inputType="text"
android:paddingLeft="10dp"
android:textAppearance="#android:style/TextAppearance.Medium" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="Password"
android:textAppearance="#android:style/TextAppearance.Medium" />
<EditText
android:id="#+id/password"
android:layout_width="156dp"
android:layout_height="45dp"
android:layout_marginTop="5dp"
android:background="#drawable/button"
android:hint="Password"
android:inputType="textPassword"
android:paddingLeft="10dp"
android:textAppearance="#android:style/TextAppearance.Medium" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
<Button
android:id="#+id/login"
android:layout_width="71dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:background="#drawable/login"
android:text="Login"
android:textAppearance="#android:style/TextAppearance.Medium"
android:textColor="#000000"
android:typeface="serif" />
<Button android:id="#+id/scan"
and
android:layout_width="71dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:background="#drawable/login"
android:text="scan"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
You can either wrap the buttons within a horizontal LinearLayout like this:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<Button
android:id="#+id/login"
android:layout_width="71dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:background="#drawable/login"
android:text="Login"
android:textAppearance="#android:style/TextAppearance.Medium"
android:textColor="#000000"
android:typeface="serif" />
<Button android:id="#+id/scan"
android:layout_width="71dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:background="#drawable/login"
android:text="scan"/>
</LinearLayout>
or use a RelativeLayout.
RealtiveLayout is the best choice:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id="#+id/button01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/entry"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="#+id/space"
/>
<TextView
android:id="#id/space"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"/>
<Button
android:id="#+id/button02"
android:layout_toRightOf="#id/button01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#id/entry"
android:layout_alignParentRight="true"
/>
</RelativeLayout>
Seems like you want two equal buttons, not wrapped content. I created a centered spacer using TextView, and relatively aligned to that. Left button to parent left and spacer, Right button to Left Button and parent right.
This should works:
Change these,
<Button
android:id="#+id/login"
android:layout_width="71dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:background="#drawable/login"
android:text="Login"
android:textAppearance="#android:style/TextAppearance.Medium"
android:textColor="#000000"
android:typeface="serif" />
<Button android:id="#+id/scan"
and
android:layout_width="71dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:background="#drawable/login"
android:text="scan"/>
with this,
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal" >
<Button
android:id="#+id/login"
android:layout_width="71dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:background="#drawable/login"
android:text="Login"
android:textAppearance="#android:style/TextAppearance.Medium"
android:textColor="#000000"
android:typeface="serif" />
<Button
android:id="#+id/scan"
android:layout_width="71dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:background="#drawable/login"
android:text="scan" />
</LinearLayout>

Button not visible at the emulator using scroll view

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ScrollView
android:id="#+id/ScrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true" >
<LinearLayout
android:id="#+id/MainParent"
android:layout_width="wrap_content"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="454dp"
android:layout_gravity="bottom"
android:layout_marginLeft="20sp"
android:layout_marginRight="20sp"
android:orientation="vertical" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="80sp"
android:text="Sim Card Master"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#color/pumpkinorange"
android:textSize="17sp" />
<TextView
android:id="#+id/simno"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5sp"
android:text="Sim No"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/darkblue"
android:textSize="14sp" />
<EditText
android:id="#+id/simName"
android:layout_width="275dp"
android:layout_height="wrap_content"
android:selectAllOnFocus="true" >
<requestFocus />
</EditText>
<TextView
android:id="#+id/TextView01"
android:layout_width="145dp"
android:layout_height="wrap_content"
android:text="Service Provider"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/darkblue"
android:textSize="14sp" />
<Spinner
android:id="#+id/spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:entries="#array/service_arrays"
android:prompt="#string/serviceprovid" />
<TextView
android:id="#+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="100sp"
android:layout_marginTop="5dp"
android:text="Unit Master"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#color/pumpkinorange"
android:textSize="17sp" />
<TextView
android:id="#+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5sp"
android:text="Unit No"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/darkblue"
android:textSize="14sp" />
<EditText
android:id="#+id/unitNo"
android:layout_width="275dp"
android:layout_height="wrap_content"
android:ems="10"
android:selectAllOnFocus="true" />
<TextView
android:id="#+id/TextView04"
android:layout_width="145dp"
android:layout_height="wrap_content"
android:text="IMEI No"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/darkblue"
android:textSize="14sp" />
<EditText
android:id="#+id/imeiNo"
android:layout_width="275dp"
android:layout_height="wrap_content"
android:ems="10"
android:selectAllOnFocus="true"/>
<TextView
android:id="#+id/vehicleNo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="80sp"
android:layout_marginTop="5dp"
android:gravity="center"
android:text="Vehicle Master"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#color/pumpkinorange"
android:textSize="17sp" />
<TextView
android:id="#+id/TextView06"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="Vehicle No"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#color/darkblue"
android:textSize="14sp" />
<EditText
android:id="#+id/vehicleNo"
android:layout_width="275dp"
android:layout_height="wrap_content"
android:ems="10"
android:selectAllOnFocus="true"/>
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="34dp"
android:layout_gravity="center"
android:text="Save"
android:textSize="15sp"
android:textStyle="italic"
android:typeface="normal" />
<Button
android:id="#+id/button2"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Reset"
android:textSize="15sp"
android:textStyle="italic"
android:typeface="normal" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
I don't know to correct this error. In xml layout i can see the button, but in the emulator its not visible or button not scrolled. also i want this two button in same line with left and right alignment.
You Specified inside scrollview second linearlayout as
<LinearLayout
android:layout_width="match_parent"
android:layout_height="454dp"
android:layout_gravity="bottom"
android:layout_marginLeft="20sp"
android:layout_marginRight="20sp"
android:orientation="vertical" >
change to
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginLeft="20sp"
android:layout_marginRight="20sp"
android:orientation="vertical" >
You Specified height fixed that why it does't display...
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_margin="3dp"
>
<Button
android:id="#+id/login_btn"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_weight="0.5"
android:text="Login"
/>
<Button
android:id="#+id/cancel_btn"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_weight="0.5"
android:text="Cancel"
/>
</LinearLayout>
Set your ScrollView's height to match_parent
<ScrollView
android:id="#+id/ScrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >

Categories

Resources