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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:50:06+00:00 2026-05-22T20:50:06+00:00

I am developing an android application in which i have taken two buttons and

  • 0

I am developing an android application in which i have taken two buttons and one edit text box.
i want to pass the data of edit text box in from of string to the next activity on click of one of the buttons, how can i pass the text to the next activity and receive that text in the new launched activity so could use the text in that.

my code for first activity is

EditText Urlis=(EditText)findViewById(R.id.entry);
final Button button = (Button) findViewById(R.id.ok);
final Intent i=new Intent(this , RSSReder.class);
final String choice=Urlis.getText().toString();

i.putExtra("key", choice);
button.setOnClickListener(new View.OnClickListener() {
    public void onClick(View v) {
        startActivity(i);
    }    
});  

and for called activity is

public class RSSReder extends Activity implements OnItemClickListener {

    public String RSSFEEDOFCHOICE;
    public final String tag = "RSSReader";
    private RSSFed feed = null;

    /** Called when the activity is first created. */

    public void onCreate(Bundle abc) {
        super.onCreate(abc);
        setContentView(R.layout.next1);

        Intent i = getIntent();
        RSSFEEDOFCHOICE =i.getStringExtra("key");

        // go get our feed!
        feed = getFeed(RSSFEEDOFCHOICE);

        // display UI
        UpdateDisplay();

    }
}

is there anything i need to change or remove.

  • 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-22T20:50:07+00:00Added an answer on May 22, 2026 at 8:50 pm

    After you have used setContentView(...) you need to reference your EditText and get the text such as…

    EditText et = (EditText) findViewById(R.id.my_edit_text);
    String theText = et.getText().toString();
    

    To pass it to another Activity you use an Intent. Example…

    Intent i = new Intent(this, MyNewActivity.class);
    i.putExtra("text_label", theText);
    startActivity(i);
    

    In the new Activity (in onCreate()), you get the Intent and retrieve the String…

    public class MyNewActivity extends Activity {
    
        String uriString;
    
        @Override
        protected void onCreate(...) {
    
            ...
    
            Intent i = getIntent();
            uriString = i.getStringExtra("text_label");
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been developing Android application which has 3 ListView and one ContextMenu for
I am developing an android application in which i have to show large data
I am developing an android application in which i have to show data from
I am developing an android application in which i have created five tabs and
I am developing an android application in which i have to play a mp4
I am developing Android Application. In which i am having list view with text
I am developing an android application In which i have a ListView with images.I
I am developing an android application in which i have to parse the url
I am developing an android application in which i have to store a bitmap
I am developing an android application in which i have to implement custom rating

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.