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 6105599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:59:18+00:00 2026-05-23T13:59:18+00:00

Intent intent = new Intent(this,Name.class); intent.putExtra(key, et.getText().toString()); startActivity(intent); Intent intent = getIntent(); String str

  • 0
Intent intent = new Intent(this,Name.class);
intent.putExtra("key", et.getText().toString());
startActivity(intent);

Intent intent = getIntent();
String str = intent.getStringExtra("key");
tv.setText(str);

From using above code I can get a string value at other activity, but I need editText object at another activity.

can anyone give Idea ?

Thanks

  • 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-05-23T13:59:19+00:00Added an answer on May 23, 2026 at 1:59 pm

    Why not send the ID and then use findViewByid() on the receiver Activity? Hope this helps:

    Intent intent = new Intent(); 
    String name="textView";
    int value=EditText.getID();
    intent.putExtra(name, value);
    setResult(RESULT_OK, intent);
    

    On receiver Activity:

    private static final int REQUEST_CODE=1;
    private int id;
    private EditText et;
    private Intent i;
    
    i = new Intent(this,Name.class);
    startActivityForResult(intent, REQUEST_CODE);
    et = (EditText)findViewById(id);
    
    protected void onActivityResult(int requestCode, int resultCode, Intent data)
    {
        if (resultCode == RESULT_OK && requestCode == REQUEST_CODE)
        {
            if (data.hasExtra("textView"))
            {
                //Get the selected file.
                id = data.getExtras().getInt("textView");
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Intent intent = new Intent(this,AnotherClass.class); intent.putExtra(Name, foo); setResult(RESULT_OK, null); super.onActivityResult(requestCode, resultCode, data); switch (requestCode)
I'm using intents to launch Google Navigation: Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(google.navigation:q= +
I launch an activity to capture a picture from camera: Intent i = new
I'm creating a notification with something similar to the following: Intent ni = new
Can't figure this one out. Done research, searched here, online, etc. Still a new
I have this Broadcast receiver registered public class NotifyAlarmBroadcast extends BroadcastReceiver{ public Context context;
I am having an issue with using TabHost in a new Intent of type
I'm trying to allow a user to supply a class name and then launch
Im going a little crazy with this. In my app, i take a string
See title for explanation. Here is the method I'm using: public Cursor getClientByName(String name)

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.