android - Fields are Nots accommodating in the same page -


i trying create registration page should contain first name, last name, gender, user name, password, email, blood group, address, dob

when trying create these list, field not accommodated in same page enter image description here

i able accommodate till email.the rest of fields(i.e blood group,address,dob) not getting accommodated in same page. how add field in same page? code layout page

<?xml version="1.0" encoding="utf-8"?>      <scrollview xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@+id/scrollview1"          android:layout_width="match_parent"          android:layout_height="wrap_content">          <linearlayout              android:id="@+id/linearlayout1"              android:layout_width="match_parent"              android:layout_height="match_parent"             android:orientation="vertical">     <textview         android:id="@+id/fname"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="first name"         android:layout_marginleft="5dp"         android:layout_marginright="5dp"         android:textappearance="?android:attr/textappearancelarge" />      <edittext         android:id="@+id/efname"         android:layout_width="match_parent"         android:layout_height="wrap_content"          android:layout_marginleft="5dp"         android:layout_marginright="5dp"         android:singleline="true">          <requestfocus />     </edittext>      <textview         android:id="@+id/lname"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="last name"         android:layout_marginleft="5dp"         android:layout_marginright="5dp"         android:textappearance="?android:attr/textappearancelarge" />      <edittext         android:id="@+id/elname"         android:layout_width="match_parent"         android:layout_height="wrap_content"          android:layout_marginleft="5dp"         android:layout_marginright="5dp"         android:singleline="true"/>      <textview         android:id="@+id/rgender"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="gender"         android:layout_marginleft="5dp"         android:layout_marginright="5dp"         android:textappearance="?android:attr/textappearancelarge" />      <spinner         android:id="@+id/spinner1"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_marginleft="5dp"         android:layout_marginright="5dp"         android:drawselectorontop="true" />      <textview         android:id="@+id/runame"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="user name"         android:layout_marginleft="5dp"         android:layout_marginright="5dp"         android:textappearance="?android:attr/textappearancelarge" />      <edittext         android:id="@+id/reuname"         android:layout_width="match_parent"         android:layout_height="wrap_content"          android:layout_marginleft="5dp"         android:layout_marginright="5dp"/>      <textview         android:id="@+id/rpass"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="password"         android:layout_marginleft="5dp"         android:layout_marginright="5dp"         android:textappearance="?android:attr/textappearancelarge" />      <edittext         android:id="@+id/repass"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:inputtype="textpassword"          android:layout_marginleft="5dp"         android:layout_marginright="5dp"/>      <textview         android:id="@+id/email"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="email"         android:layout_marginleft="5dp"         android:layout_marginright="5dp"         android:textappearance="?android:attr/textappearancelarge" />      <edittext         android:id="@+id/eemail"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:inputtype="textemailaddress"          android:layout_marginleft="5dp"         android:layout_marginright="5dp"/>      <relativelayout         android:id="@+id/relativelayout1"         android:layout_width="match_parent"         android:layout_height="wrap_content" >           <button         android:id="@+id/submit"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="submit"          android:layout_marginleft="5dp"         android:layout_marginright="5dp"/>      <button         android:id="@+id/cancel"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="cancel"          android:layout_torightof="@id/submit"/>      </relativelayout> </linearlayout>     </scrollview> 

you views overlapping because putting them inside relativelayout. if put them above relative layout won't. added sample fields :

<?xml version="1.0" encoding="utf-8"?> <scrollview xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/scrollview1"     android:layout_width="match_parent"     android:layout_height="wrap_content" >      <linearlayout         android:id="@+id/linearlayout1"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:orientation="vertical" >          <textview             android:id="@+id/fname"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:text="first name"             android:textappearance="?android:attr/textappearancelarge" />          <edittext             android:id="@+id/efname"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:singleline="true" >              <requestfocus />         </edittext>          <textview             android:id="@+id/lname"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:text="address"             android:textappearance="?android:attr/textappearancelarge" />          <edittext             android:id="@+id/elname"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:singleline="true" />          <textview             android:id="@+id/rgender"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:text="gender"             android:textappearance="?android:attr/textappearancelarge" />          <spinner             android:id="@+id/spinner1"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:drawselectorontop="true" />          <textview             android:id="@+id/runame"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:text="user name"             android:textappearance="?android:attr/textappearancelarge" />          <edittext             android:id="@+id/reuname"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp" />          <textview             android:id="@+id/rpass"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:text="password"             android:textappearance="?android:attr/textappearancelarge" />          <edittext             android:id="@+id/repass"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:inputtype="textpassword" />          <textview             android:id="@+id/email"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:text="email"             android:textappearance="?android:attr/textappearancelarge" />          <edittext             android:id="@+id/eemail"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:inputtype="textemailaddress" />          <textview             android:id="@+id/email"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:text="blood group"             android:textappearance="?android:attr/textappearancelarge" />          <edittext             android:id="@+id/eemail"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:inputtype="textemailaddress" />          <textview             android:id="@+id/email"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:text="email"             android:textappearance="?android:attr/textappearancelarge" />          <edittext             android:id="@+id/eemail"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:inputtype="textemailaddress" />          <textview             android:id="@+id/email"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:text="blood group"             android:textappearance="?android:attr/textappearancelarge" />          <edittext             android:id="@+id/eemail"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_marginleft="5dp"             android:layout_marginright="5dp"             android:inputtype="textemailaddress" />          <relativelayout             android:id="@+id/relativelayout1"             android:layout_width="match_parent"             android:layout_height="wrap_content" >              <button                 android:id="@+id/submit"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:layout_marginleft="5dp"                 android:layout_marginright="5dp"                 android:text="submit" />              <button                 android:id="@+id/cancel"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:layout_torightof="@id/submit"                 android:text="cancel" />         </relativelayout>     </linearlayout>  </scrollview> 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -