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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:27:11+00:00 2026-05-26T14:27:11+00:00

The problem is I am coming from another Activity, and when I try to

  • 0

The problem is I am coming from another Activity, and when I try to go to the new Activity, it just sits on the old one until the new one is displayed, so I am trying to get it to go to the new Activity right away, and then bring up a loading screen while it gets the content. (The content is either coming from a website or an internal database).

I’ve tried the progressDialog from the Android development site but it doesn’t do anything as the Activity finishes loading before showing anything, so by time it shows up, theres nothing to load.

  • 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-26T14:27:11+00:00Added an answer on May 26, 2026 at 2:27 pm

    First start new activity first and then call the async task file.. this will start new activity when u close old one. in Oncreate of new activity call the asyn task class like below

    public class MainActivity extends Activity {
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
                setContentView(your layout here);
                new GetTask(this).execute();
    
       }
    }
    
    class GetTask extends AsyncTask<Object, Void, String> {
        Context context;
    
        GetTask(Context context, String userid) {
            this.context = context;
        }
    
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
    
            mDialog = new ProgressDialog(mContext);
            mDialog.setMessage("Please wait...");
            mDialog.show();
        }
    
        @Override
        protected String doInBackground(Object... params) {
            // here you can get the details from db or web and fetch it..
        }
    
        @Override
        protected void onPostExecute(String result) {
            super.onPostExecute(result);
    
            mDialog.dismiss();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to transfer data from one page to another but some problem
Another question about my implementation. I am fairly new to java/android coming from a
I am currently running into a problem where an element is coming back from
So, one problem pattern that I keep coming across and don't have a good
I'm trying to write a simple WPF application in C#. Coming from a primarily
So this error is coming from an attempt to solve another issue I am
My Goal: Is to move data from one table to another if the row
I am new to ObC and have a problem that i just cant fix.
I have a problem. I am coding using VS2008. I am calling webservices from
The general problem: We have urls coming to our IIS web servers formatted like:

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.