I designed the main activity to be like this:Main Activity design
Unfortunately, it appears like in the real mobile Real Mobile Snapshot
What is wrong?
Below is the XML file of the MainActivity .
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Number 1"
android:inputType="number"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="16dp" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Number 2"
android:inputType="number"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="93dp" />
<TextView
android:id="#+id/textView3"
android:layout_width="206dp"
android:layout_height="41dp"
android:text="TextView"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="249dp" />
<EditText
android:id="#+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName"
android:text="Result"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="189dp" />
<Button
android:id="#+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sum"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="312dp" />
The root layout should be LinearLayout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Number 1"
android:inputType="number"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="16dp" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Number 2"
android:inputType="number"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="93dp" />
<TextView
android:id="#+id/textView3"
android:layout_width="206dp"
android:layout_height="41dp"
android:text="TextView"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="249dp" />
<EditText
android:id="#+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName"
android:text="Result"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="189dp" />
<Button
android:id="#+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sum"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="312dp" />
</LinearLayout>
Related
I followed someone example on having a relative layout with a scrollview. I did exactly it and my page still won't scroll. Am I missing out something? Or must I change it to a linear layout to make it work? Still new to Android Studio here.
Any help will be much appreciated. Randomly adding words so I can post this.
activity_info.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="900dp"
tools:context="mapp.com.sg.receiptscanner.Info">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="900dp"
>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="900dp"
>
<TextView
android:id="#+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignStart="#+id/editText5"
android:layout_marginTop="13dp"
android:text="Name of Product:"
android:textColor="#android:color/black"
android:textSize="18sp"
tools:layout_editor_absoluteX="25dp"
tools:layout_editor_absoluteY="16dp" />
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/editText6"
android:layout_below="#+id/editText5"
android:layout_marginTop="16dp"
android:text="Company:"
android:textColor="#android:color/black"
android:textSize="18sp"
tools:layout_editor_absoluteX="25dp"
tools:layout_editor_absoluteY="16dp" />
<EditText
android:id="#+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/editText5"
android:layout_below="#+id/textView9"
android:ems="10"
android:inputType="textPersonName"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="61dp" />
<EditText
android:id="#+id/editText5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/textView8"
android:layout_marginStart="13dp"
android:ems="10"
android:inputType="textPersonName"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="61dp" />
<TextView
android:id="#+id/textView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/editText6"
android:layout_below="#+id/editText6"
android:layout_marginTop="22dp"
android:textSize="18sp" />
<EditText
android:id="#+id/editText8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/textView11"
android:layout_below="#+id/textView12"
android:ems="10"
android:inputType="textPersonName" />
<TextView
android:id="#+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/editText6"
android:layout_marginTop="11dp"
android:layout_toEndOf="#+id/textView11"
android:text="Receipt Number:"
android:textColor="#android:color/black"
android:textSize="18sp" />
<TextView
android:id="#+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/editText8"
android:layout_below="#+id/editText8"
android:layout_marginTop="19dp"
android:text="Start Date of Warranty:"
android:textColor="#android:color/black"
android:textSize="18sp" />
<EditText
android:id="#+id/editText10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="12dp"
android:layout_marginTop="273dp"
android:ems="10"
android:inputType="textPersonName" />
<TextView
android:id="#+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/editText10"
android:layout_alignTop="#+id/editText10"
android:layout_marginTop="60dp"
android:text="Expiry Date of Warranty:"
android:textColor="#android:color/black"
android:textSize="18sp" />
<EditText
android:id="#+id/editText11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/textView14"
android:layout_below="#+id/textView14"
android:ems="10"
android:inputType="textPersonName" />
<TextView
android:id="#+id/textView15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/editText11"
android:layout_below="#+id/editText11"
android:layout_marginTop="14dp"
android:text="Bought from:"
android:textColor="#android:color/black"
android:textSize="18sp" />
<EditText
android:id="#+id/editText12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/textView15"
android:layout_below="#+id/textView15"
android:ems="10"
android:inputType="textPersonName" />
<TextView
android:id="#+id/textView16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/editText12"
android:layout_below="#+id/editText10"
android:layout_marginTop="177dp"
android:text="Warranty Site:"
android:textColor="#android:color/black"
android:textSize="18sp" />
<EditText
android:id="#+id/editText14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/textView16"
android:layout_below="#+id/textView16"
android:ems="10"
android:inputType="textPersonName" />
</RelativeLayout>
</ScrollView>
We can able to scroll the view only when the items in the scroll view exits the visibility. I check your code it happens for your layout too. For checking add few more item in that scroll view, It will start scroll
And one more thing instead of setting some constant value set android:layout_height="wrap_content"
This should work:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="mapp.com.sg.receiptscanner.Info">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
always use this
android:layout_width="match_parent"
android:layout_height="wrap_content"
for scrollview and its only child.
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
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">
<ScrollView style="#style/ccccc"
android:layout_height="match_parent"
android:layout_width="match_parent">
<RelativeLayout
android:id="#+id/activity_move"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingTop="#dimen/activity_vertical_margin"
android:background="#fdf1dc"
android:orientation="vertical"
android:scrollbars="vertical" >
<TextView
android:text="Create Your Monster"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#6D0000"
android:textAlignment="center"
android:textAllCaps="false"
android:fontFamily="serif"
android:textStyle="normal|bold"
android:textSize="24sp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:ems="10"
android:id="#+id/nameTextBox"
android:textAlignment="center"
android:textColor="#6D0000"
android:fontFamily="serif"
android:typeface="sans"
android:textSize="14sp"
android:text="Enter Name..."
android:layout_marginTop="38dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<TextView
android:text="NAME"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView4"
android:textAlignment="center"
android:textStyle="normal|bold"
android:fontFamily="serif"
android:textColor="#6D0000"
android:textSize="18sp"
android:layout_alignBaseline="#+id/nameTextBox"
android:layout_alignBottom="#+id/nameTextBox"
android:layout_toLeftOf="#+id/nameTextBox"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="#android:drawable/ic_menu_upload"
android:id="#+id/imageButton"
android:elevation="0dp"
style="#android:style/Widget.Holo.Light.ImageButton"
android:layout_below="#+id/nameTextBox"
android:layout_alignRight="#+id/editText3"
android:layout_alignEnd="#+id/editText3" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:ems="10"
android:id="#+id/editText3"
android:text="STR"
android:textAlignment="center"
android:textColor="#6D0000"
android:textSize="14sp"
android:fontFamily="serif"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:ems="10"
android:id="#+id/editText5"
android:textColor="#6D0000"
android:textSize="14sp"
android:fontFamily="serif"
android:text="CON"
android:textAlignment="center"
android:layout_below="#+id/editText3"
android:layout_alignLeft="#+id/editText3"
android:layout_alignStart="#+id/editText3" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:ems="10"
android:id="#+id/editText6"
android:textSize="14sp"
android:fontFamily="serif"
android:textColor="#6D0000"
android:text="INT"
android:textAlignment="center"
android:layout_below="#+id/editText5"
android:layout_alignLeft="#+id/editText5"
android:layout_alignStart="#+id/editText5" />
<TextView
android:text="STATS"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView5"
android:textColor="#6D0000"
android:textSize="18sp"
android:fontFamily="serif"
android:textStyle="normal|bold"
android:textAlignment="center"
android:layout_marginBottom="13dp"
android:layout_above="#+id/editText3"
android:layout_centerHorizontal="true" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:ems="10"
android:layout_below="#+id/editText6"
android:layout_centerHorizontal="true"
android:id="#+id/editText"
android:textSize="14sp"
android:fontFamily="serif"
android:textColor="#6D0000"
android:textAlignment="center"
android:text="DEX" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:ems="10"
android:layout_below="#+id/editText"
android:layout_centerHorizontal="true"
android:id="#+id/editText2"
android:textSize="14sp"
android:textColor="#6D0000"
android:fontFamily="serif"
android:text="WIS"
android:textAlignment="center" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:ems="10"
android:layout_below="#+id/editText2"
android:layout_alignLeft="#+id/editText2"
android:layout_alignStart="#+id/editText2"
android:id="#+id/editText4"
android:textSize="14sp"
android:textColor="#6D0000"
android:textAlignment="center"
android:text="CHA"
android:fontFamily="serif" />
<TextView
android:text="IMAGE"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/imageButton"
android:layout_marginBottom="14dp"
android:id="#+id/textView2"
android:layout_toLeftOf="#+id/nameTextBox"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textAlignment="center"
android:textStyle="normal|bold"
android:textColor="#6D0000"
android:textSize="18sp"
android:fontFamily="serif" />
<TextView
android:text="LANGUAGES"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="55dp"
android:id="#+id/textView7"
android:textColor="#6D0000"
android:fontFamily="serif"
android:textSize="18sp"
android:textStyle="normal|bold"
android:layout_below="#+id/editText4"
android:layout_centerHorizontal="true" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/textView7"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
android:id="#+id/LanguageSpinner1"
android:entries="#array/langList"
android:prompt="#string/langPrompt"/>
<TextView
android:text="First Language"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView8"
android:textColor="#6D0000"
android:textAlignment="center"
android:fontFamily="serif"
android:textSize="16sp"
android:layout_below="#+id/textView7"
android:layout_alignLeft="#+id/textView7"
android:layout_alignStart="#+id/textView7"
android:layout_marginTop="24dp"
android:layout_alignRight="#+id/textView7"
android:layout_alignEnd="#+id/textView7" />
<TextView
android:text="Second Language"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView9"
android:textColor="#6D0000"
android:textAlignment="center"
android:textSize="16sp"
android:fontFamily="serif"
android:layout_below="#+id/LanguageSpinner1"
android:layout_centerHorizontal="true" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/spinner"
android:layout_below="#+id/textView9"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:entries="#array/langList" />
</RelativeLayout>
</ScrollView>
</LinearLayout>
Could anyone help me find the reason as to why this won't scroll? Inside the relative layout I have textViews, spinners and editTexts. I'm pretty new to android and xml so I have no idea why it's not scrolling.
Edit: here is the full layout as requested.
Based on your code you don't need the parent linear layout. Try to delete it and use the scrollView as parent. And also remove the orientation and scrollbars attributes to the relativeLayout, you don't need them.
I am implementing an registration page in which i want to implement the Scrollview. please help. Android Relative Layout Align Center i have tried this but still not getting it.
Registration.Xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1"
android:background="#f33a58"
android:baselineAligned="false"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Registration Page"
android:id="#+id/logo"
android:layout_marginTop="40dp"
android:textSize="35dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="20dp"
android:textColor="#ffffff" />
<EditText
android:id="#+id/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView1"
android:layout_below="#+id/textView1"
android:ems="10"
android:hint="Username"
android:layout_gravity="center"
android:textColorHint="#ffffff"
android:backgroundTint="#ffffff"
style="#style/AppTheme.PopupOverlay" />
<EditText
android:id="#+id/password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:layout_gravity="center"
android:hint="Password"
android:password="true"
android:inputType="textPassword"
android:textColorHint="#ffffff"
android:layout_marginTop="20dp"
android:backgroundTint="#ffffff" />
<EditText
android:id="#+id/email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:layout_gravity="center"
android:hint="Email"
android:inputType="textEmailAddress"
android:textColorHint="#ffffff"
android:layout_marginTop="20dp"
android:backgroundTint="#ffffff">
</EditText>
<EditText
android:id="#+id/phone_no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:layout_gravity="center"
android:hint="Phone Number"
android:inputType="phone"
android:layout_marginTop="20dp"
android:maxLength="10"
android:digits="0123456789"
android:textColorHint="#ffffff"
android:backgroundTint="#ffffff" />
<Button
android:id="#+id/register"
android:layout_width="134dp"
android:layout_height="wrap_content"
android:text="Register"
android:layout_marginTop="20dp"
android:background="#drawable/button"
android:layout_gravity="center_horizontal" />
</LinearLayout>
<?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" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical" >
<TextView
android:id="#+id/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="20dp"
android:layout_marginTop="40dp"
android:text="Registration Page"
android:textColor="#ffffff"
android:textSize="35dp" />
<EditText
android:id="#+id/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/textView1"
android:layout_below="#+id/textView1"
android:layout_gravity="center"
android:backgroundTint="#ffffff"
android:ems="10"
android:hint="Username"
style="#style/AppTheme.PopupOverlay"
android:textColorHint="#ffffff" />
<EditText
android:id="#+id/password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:backgroundTint="#ffffff"
android:ems="10"
android:hint="Password"
android:inputType="textPassword"
android:password="true"
android:textColorHint="#ffffff" />
<EditText
android:id="#+id/email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:backgroundTint="#ffffff"
android:ems="10"
android:hint="Email"
android:inputType="textEmailAddress"
android:textColorHint="#ffffff" >
</EditText>
<EditText
android:id="#+id/phone_no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:backgroundTint="#ffffff"
android:digits="0123456789"
android:ems="10"
android:hint="Phone Number"
android:inputType="phone"
android:maxLength="10"
android:textColorHint="#ffffff" />
<Button
android:id="#+id/register"
android:layout_width="134dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:background="#drawable/button"
android:text="Register" />
</LinearLayout>
</ScrollView>
This scrollview freezes after a few seconds. How can I solve it? This works perfectly fine but it freezes after a while.
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/scroll_view"
android:layout_width="match_parent"
android:fillViewport="true"
android:layout_height="match_parent" >
<AbsoluteLayout
android:id="#+id/content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#drawable/acc_stngs"
android:paddingTop="50dip"
android:paddingBottom="50dip"
>
<TextView
android:id="#+id/textView1"
android:layout_width="162dp"
android:layout_height="50dip"
android:layout_x="17dp"
android:layout_y="95dp"
android:text="Name:"
android:textColor="#ff333333"
android:textSize="20dp"/>
<EditText
android:id="#+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="85dp"
android:layout_y="95dp"
android:ems="10"
android:inputType="textPersonName" >
<requestFocus />
</EditText>
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="17dp"
android:layout_y="160dp"
android:text="Surname:"
android:textColor="#ff333333"
android:textSize="20dp" />
<EditText
android:id="#+id/editText2"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_x="105dp"
android:layout_y="160dp"
android:ems="10"
android:inputType="textPersonName" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="17dp"
android:layout_y="280dp"
android:text="E-mail:"
android:textColor="#ff333333"
android:textSize="20dp" />
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="87dp"
android:layout_y="280dp"
android:ems="10"
android:inputType="textPersonName" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="17dp"
android:layout_y="380dp"
android:text="Address:"
android:textColor="#ff333333"
android:textSize="20dp" />
<EditText
android:id="#+id/editText4"
android:layout_width="278dp"
android:layout_height="96dp"
android:layout_x="19dp"
android:layout_y="450dp"
android:ems="10"
android:inputType="textMultiLine" />
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="17dp"
android:layout_y="630dp"
android:text="Current Password:"
android:textColor="#ff333333"
android:textSize="20dp" />
<EditText
android:id="#+id/editText5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="17dp"
android:layout_y="655dp"
android:ems="10"
android:inputType="textPassword" />
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="17dp"
android:layout_y="710dp"
android:text="New Password:"
android:textColor="#ff333333"
android:textSize="20dp" />
<EditText
android:id="#+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="17dp"
android:layout_y="735dp"
android:ems="10"
android:inputType="textPassword" />
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="17dp"
android:layout_y="790dp"
android:text="Confirm Password:"
android:textColor="#ff333333"
android:textSize="20dp" />
<EditText
android:id="#+id/editText7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="17dp"
android:layout_y="815dp"
android:ems="10"
android:inputType="textPassword" />
<Button
android:id="#+id/widget46"
android:layout_width="135dp"
android:layout_height="wrap_content"
android:layout_x="17dp"
android:layout_y="900dp"
android:background="#ff990033"
android:onClick="LogOutUser"
android:text="Log Out"
android:textColor="#ffffffff" />
<Button
android:id="#+id/widget46"
android:layout_width="135dp"
android:layout_height="wrap_content"
android:layout_x="170dp"
android:layout_y="900dp"
android:background="#ff000099"
android:onClick=""
android:text="Save"
android:textColor="#ffffffff" />
</AbsoluteLayout>
</ScrollView>
i have 9 edit texts in one activity and it takes user inputs within certain time..if the user fills them within certain time i have to populate them to the listviw in another activity....and from the listview of another activity..i have to get the same edittexts ...here is the xml view of first activity...
enter code here<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="HardcodedText" >
<EditText
android:id="#+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/editText2"
android:layout_marginRight="90dp"
android:layout_marginTop="38dp"
android:ems="10"
android:hint="2."
tools:ignore="TextFields,HardcodedText" />
<EditText
android:id="#+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="31dp"
android:ems="10"
android:hint="3."
android:inputType="textPersonName"
tools:ignore="HardcodedText" />
<EditText
android:id="#+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="#+id/editText4"
android:ems="10"
android:hint="5."
tools:ignore="TextFields" />
<EditText
android:id="#+id/editText5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/editText6"
android:layout_marginBottom="48dp"
android:layout_toRightOf="#+id/editText6"
android:ems="10"
android:hint="4."
tools:ignore="TextFields" />
<EditText
android:id="#+id/editText7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/editText6"
android:layout_alignParentLeft="true"
android:layout_marginLeft="65dp"
android:ems="10"
android:hint="6."
tools:ignore="TextFields" />
<EditText
android:id="#+id/editText8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/editText5"
android:layout_alignLeft="#+id/editText7"
android:ems="10"
android:focusableInTouchMode="true"
android:hint="7."
tools:ignore="TextFields" />
<EditText
android:id="#+id/editText9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/editText8"
android:layout_below="#+id/editText3"
android:ems="10"
android:focusableInTouchMode="true"
android:hint="8."
tools:ignore="TextFields" />
<EditText
android:id="#+id/editText10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/editText2"
android:layout_alignBottom="#+id/editText2"
android:layout_alignParentLeft="true"
android:layout_marginLeft="43dp"
android:ems="10"
android:focusableInTouchMode="true"
android:hint="9."
tools:ignore="TextFields" />
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/editText4"
android:layout_centerHorizontal="true"
android:text="TextView"
tools:ignore="HardcodedText" />
<EditText
android:id="#+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="27dp"
android:layout_toRightOf="#+id/textView1"
android:ems="10"
android:focusableInTouchMode="true"
android:hint="1."
tools:ignore="TextFields,HardcodedText" >
<requestFocus />
</EditText>
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:linksClickable="true"
android:text="finish" />
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/editText6"
android:layout_alignBottom="#+id/editText6"
android:layout_toLeftOf="#+id/button1"
android:text="TextView" />
</RelativeLayout>
and here is the listview activity..
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<EditText
android:id="#+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="20dp"
android:layout_marginTop="16dp"
android:ems="10"
android:hint="search saved session"
tools:ignore="TextFields,HardcodedText" >
<requestFocus />
</EditText>
<SearchView
android:id="#+id/searchView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/editText1"
android:layout_toRightOf="#+id/editText1"
tools:ignore="NewApi" >
</SearchView>
<ListView
android:id="#+id/listView1"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_alignLeft="#+id/editText1"
android:layout_below="#+id/searchView1" >
</ListView>
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="15dp"
android:text="saved"
tools:ignore="HardcodedText" />
<Button
android:id="#+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/button2"
android:layout_alignBottom="#+id/button2"
android:layout_alignRight="#+id/searchView1"
android:text="about"
tools:ignore="HardcodedText" />
<Button
android:id="#+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/button1"
android:layout_alignBottom="#+id/button1"
android:layout_marginLeft="10dp"
android:layout_toRightOf="#+id/button1"
android:text="new session"
tools:ignore="HardcodedText" />
</RelativeLayout>