Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8918033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:38:56+00:00 2026-06-15T05:38:56+00:00

I have 2 xml, the name is formOne.xml and formTwo.xml formOne.xml look like this

  • 0

I have 2 xml, the name is formOne.xml and formTwo.xml

formOne.xml look like this :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:paddingLeft="16dp"
    android:paddingRight="16dp">

    <EditText
        android:id="@+id/editTextName"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

  </LinearLayout>

and fomTwo.xml :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:paddingLeft="16dp"
    android:paddingRight="16dp">

    <Button
            android:id="@+id/buttonSave"
            android:layout_width="120dp"
            android:layout_height="wrap_content"
            android:text="@string/btSave" />

  </LinearLayout>

and i have two activity, the name is FormOne.java and FormTwo.java

FormOne.java :

public class FormOne extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.formOne);
            EditText etName = (EditText) findViewById(R.id.editTextName);
}

}

and FormTwo.java :

public class FormTwo extends Activity implements OnClickListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.formTwo);

    EditText etName = (EditText) findViewById(R.id.editTextName);

    Button btSave = (Button) findViewById(R.id.buttonSave);
    btSimpan.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {
            if (etName.getText().length() != 0) {
                Toast.makeText(FormTwo.this, "Name is : "+etName.getText().toString(), Toast.LENGTH_SHORT).show();
            }
            else {
                Toast.makeText(FormTwo.this, "Input the name please", Toast.LENGTH_SHORT).show();
            }
            // TODO Auto-generated method stub
        }
    });
}

i want to catch value from editTextName, and value can show in FormTwo.java with Toast.

but myapplication force close,
how i can to get value editTextName, without passing data with bundle. because in FormOne.java not any button to send value editTextName.

Thanks in Advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:38:57+00:00Added an answer on June 15, 2026 at 5:38 am

    Save edittext value into sharedpreferences on ontextchangelistener() event of edittext and get data from sharedpreferences into form2 activity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have XML similar to the following <?xml version=1.0 encoding=utf-8?> <foo name=FooBar xmlns=http://mydomain/myapp/ver/myschema.xsd> <bars
I have XML which is like: <?xml version="1.0" encoding="utf-16"?> <RootNodeName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" MyAttribute="7" xmlns="mylink">
I have XML like this: (this is the soup variable) <?xml version=1.0 encoding=utf-8?> <results>
We have XML file like below... <?xml version='1.0'?> <T0020 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://www.safersys.org/namespaces/T0020V1 T0020V1.xsd xmlns=http://www.safersys.org/namespaces/T0020V1> <IRP_ACCOUNT>
I have XML that looks like the following: <?xml version=1.0 encoding=UTF-8 standalone=yes?> <ObjectList> <object
I have XML file which looks like this: <?xml version=1.0?> <results> <row id=100><name>name blah</name></row>
I have Xml which looks like this: <DataMapper xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema> <SqlTable /> <Level_01s> <DataParameter>
I have XML that looks something like this: <Root xmlns=http://widgetspecA.com/ns> ...any... <WidgetBox> <A/> <B/>
<?xml version=1.0 encoding=UTF-8?> <form:Documents xmlns:form=http://www.abbyy.com/FlexiCapture/Schemas/Export/FormData.xsd xmlns:addData=http://www.abbyy.com/FlexiCapture/Schemas/Export/AdditionalFormData.xsd> <_Document_Definition_1:_Document_Definition_1 addData:ImagePath=C:\POC\Export\Test.pdf xmlns:_Document_Definition_1=http://www.abbyy.com/FlexiCapture/Schemas/Export/Document_Definition_1.xsd> <_Page_1> <_First_Name>John</_First_Name> <_Last_Name>Doe</_Last_Name> </_Page_1> </_Document_Definition_1:_Document_Definition_1>
I have XML that looks like this: <Parameter Name=parameter name Value=parameter value /> which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.