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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:08:38+00:00 2026-06-15T16:08:38+00:00

I had given my web application url in Main Activity.java file of Android project

  • 0

I had given my web application url in Main Activity.java file of Android project to convert into Android application using Phone Gap framework. My application is taking time to load in Android device, hence I want to give loading image while loading.

I had given code like this:

       super.setIntegerProperty("loadUrlTimeoutValue", 100000);     
       super.loadUrl("http://abc company/application"); 

       ProgressDialog progressDialog = new ProgressDialog(this);
       progressDialog.setMessage("Loading...");
       progressDialog.setCancelable(true);
       progressDialog.setIndeterminate(true);          
       progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
       progressDialog.setProgress(0); // set percentage completed to 0%      
       progressDialog.show();          
      //  progressDialog.dismiss(); 

But progress dialog is showing after load of my application, but I want to dismiss it after loading. Is there any need of if condition here?

  • 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-15T16:08:39+00:00Added an answer on June 15, 2026 at 4:08 pm

    You have to create the Dialog on the UI thread and show it and then fire the load of the application in other Thread who should dismiss the dialog when the thread work has finished.

    Here you have an example:

    Android tutorial: How to make a progress dialog

    Code sample:

    private void runDialog(final int seconds)
    {
            progressDialog = ProgressDialog.show(this, "Please wait....", "Here your message");
    
            new Thread(new Runnable(){
                public void run(){
                    try {
                                      //Do your application load here
    
                        progressDialog.dismiss();
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }).start();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a new MVC2 project using the ASP.NET MVC2 Web Application, which
I am using c#, asp.net and working on a web application. I initially had
I'm using C# in VS2010 and I need some help with a web application.
I was recently given an older ASP web application to maintain. I haven't touched
I had made a service using wcf i tested it by making a project
I trying to deploy Java EE web application on Geronimo container with Jetty web
I'm creating an application in Visual Studio which uses web reference. The URL for
I have a quiz web application, players of the quiz are given 20 seconds
I've had very limited exposure to Java Web development side and suddenly been asked
I have a location using our ASP.NET 4.0 web application which was running fine

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.