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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:14:42+00:00 2026-06-01T10:14:42+00:00

I am confused here. What my program do: displays a view( main layout) that

  • 0

I am confused here.

What my program do:

  • displays a view(main layout) that allows user to enter some values(contains TextViews, EdiTexts, a single Button)
  • when button is pressed, it contacts server and fetches data (HTTP POST – uses AsyncTask & get result)
  • now format this data(result from server) and display it in another layout(output layout)
  • when user presses back button, it goes back to main page(main layout) so to allow user to enter new data and fetch output from server again

What I have done:

  • i have created an activity called “MyApp”
  • created two layouts – main & output
  • created button handler code for “Submit” button (of main layout) to start AsyncTask and to do HTTP posting and fetching of data
  • in onPostExecute(), i have written code to display output layout (setContentView(R.layout.output);) and to create TextViews in it and setText to set text.

After reading some articles i find i have to use separate activity to display output. Pass data from fetch operation of my main activity to second activity(output activity) and format it there and write code for button click handler to get back to main activity.
To send data from main activity to output activity, i should use Bundle. Correct ? Is anything to take care other than this ? Please guide me.

  • 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-01T10:14:43+00:00Added an answer on June 1, 2026 at 10:14 am
    In onPostExecute() call new activity with your data.
    
    i.e., 
    Intent i = new Intent(firstactivity.this,secondactivity.class);
    i.putExtra("key","value");
    startActivity(i);
     and in the second activity you can read value as below
    
    value = getIntent().getStringExtra("key"); // if in first activity value is string 
    value = getIntent().getBooleanExtra("key"); // if in first activity value is boolean 
    
    Try this....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, I need some help here. I'm attempting to write a program that rolls
Totally confused here. I have a PARENT UIViewController that needs to pass an NSMutableArray
I'm a bit confused here. Microsoft as far as I can tell claims that
I have a Gui which allows the user to click a button and view
I am running a phread test program until it fails. Here is the main
Here's a question on a test that I got wrong, I'm confused by how
Im confused regarding which scope should i use. Here i have a module, that
I am confused with this program. #include <stdio.h> int main(void) { char* ptr=MET ADSD;
Confused here... I have two dates which I NSLog to console and get: dates
Very confused here, trying out the yuicompressor on a simple javascript file. My js

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.