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

  • Home
  • SEARCH
  • 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 8681197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:26:43+00:00 2026-06-12T21:26:43+00:00

EDIT I now have this code: public void sendMessage(View view) { Intent intent =

  • 0

EDIT

I now have this code:

public void sendMessage(View view) {
       Intent intent = new Intent(this, DisplayMessageActivity.class);
        EditText editText = (EditText) findViewById(R.id.enter_name);
        String message = editText.getText().toString();
        intent.putExtra(EXTRA_MESSAGE, message);

        EditText editText1 = (EditText) findViewById(R.id.enter_age);
        String message1 = editText1.getText().toString();
        intent.putExtra(EXTRA_MESSAGE, message1);

        EditText editText2 = (EditText) findViewById(R.id.enter_height);
        String message2 = editText2.getText().toString();
        intent.putExtra(EXTRA_MESSAGE, message2);

        EditText editText3 = (EditText) findViewById(R.id.enter_weight);
        String message3 = editText3.getText().toString();
        intent.putExtra(EXTRA_MESSAGE, message3);

        EditText editText4 = (EditText) findViewById(R.id.enter_gender);
        String message4 = editText4.getText().toString();
        intent.putExtra(EXTRA_MESSAGE, message4);

        startActivity(intent);
    }
}

How would I go about withdrawing both the information from what is in all these windows at the same time? As I would like to save it in a user profile. Currently this is my code, but I am only being given the information from “enter_gender”.

public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Get the message from the intent
        Intent intent = getIntent();
        String message = intent.getStringExtra(NutritionHandler.EXTRA_MESSAGE);

        // Create the text view
        TextView textView = new TextView(this);
        textView.setTextSize(40);
        textView.setText(message);


        // Set the text view as the activity layout
        setContentView(textView);
    }
  • 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-12T21:26:44+00:00Added an answer on June 12, 2026 at 9:26 pm

    Try below,

    Your Xml

    <EditText
        android:id="@+id/edtName"       
        android:layout_height="40dp"    
        android:layout_below="@+id/txtName"  
        android:background="@drawable/edittext" 
        android:layout_width="fill_parent"
        android:layout_marginRight="5dip" 
        android:hint="@string/hnt_name"  
        android:layout_marginLeft="5dip"   
        android:inputType="textCapSentences"
        /> 
    
     <EditText
        android:id="@+id/edtAge" 
        android:layout_height="40dp"   
        android:layout_below="@+id/txtEmailid"  
        android:background="@drawable/edittext" 
        android:layout_width="fill_parent"
        android:layout_marginRight="5dip"   
        android:layout_marginLeft="5dip" 
        android:hint="@string/hnt_emailid"      
        android:inputType="textEmailAddress"    
    
        />
    

    In your Oncreate

     EditText name = (EditText) findViewById(R.id.edtName);        
     EditText  age = (EditText) findViewById(R.id.edtAge);
    

    Get This Value

       String var_name = name.getText().toString();  
       String var_age = age.getText().toString();
    

    Hope it helps

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

Sidebar

Related Questions

I have this code : Button groupsButton = (Button)findViewById(R.id.groupsButton); groupsButton.setOnClickListener(new OnClickListener() { public void
EDIT: I've altered the code to now read: View code: <h3>Your Orders:</h3> <table class=order-items>
Let's say I have this code: class Score { public Update(int score) { update
I have this code inside my BaseAdapter Adapter: public View getView(final int position, View
I have this code:( BITMAPS is a free name) class BITMAPS{ public: static ALLEGRO_BITMAP
i have this code to show gif image with Movie. public class GIFView extends
Edit: original question below, but I revise it now that I have some code
EDIT: This code now works correctly, I only left it in case someone finds
In my application (WPF) i have this window: public partial class Window1 : Window
I have an EditText serialText = (EditText) findViewById(R.id.pinText); Now onclick of somebutton, I should

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.