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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:20:34+00:00 2026-05-19T10:20:34+00:00

I want to open a ProgressDialog when I click on the List Item that

  • 0

I want to open a ProgressDialog when I click on the List Item that opens the data of the clicked Item form the Web Service.
The ProgressDialog needs to be appeared till the WebContent of the clicked Item gets opened.

I know the code of using the Progress Dialog but I don’t know how to dismiss it particularly.

I have heard that Handler is to be used for dismissing the Progress Dialog but I didn’t found any worth example for using the Handler ultimately.

Can anybody please tell me how can I use the Handler to dismiss the Progress Dialog?

Thanks,
david

  • 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-19T10:20:35+00:00Added an answer on May 19, 2026 at 10:20 am

    Hi this is what you want

            public void onClick(View v)
            {
                mDialog = new ProgressDialog(Home.this);
                mDialog.setMessage("Please wait...");
                mDialog.setCancelable(false);
                mDialog.show();
                new Thread(new Runnable()
                {
                    @Override
                    public void run()
                    {
                        statusInquiry();
                    }
                }).start();
            }
    

    here is the web webservice that is called

    void statusInquiry()
    {
        try
        {
            //calling webservice
                        // after then of whole web part you will send handler a msg
            mHandler.sendEmptyMessage(10);
        }
        catch (Exception e)
        {
            mHandler.sendEmptyMessage(1);
        }
    }
    

    and here goes handler code

    Handler mHandler = new Handler()
    {
        public void handleMessage(android.os.Message msg)
        {
            super.handleMessage(msg);
    
            switch (msg.what)
            {
                case 10:
                    mDialog.dismiss();
                    break;
                        }
                 }
          }
     };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to open a website on a button click of asp.net web page.
I have web application in that I have a ajaxTabedinterface. I want open the
I want to open html files from a shell script. I know that Ubuntu
I want to open a pop-up window on click of 'link', then show some
i want to open a new pop up window when user click the button.But
I want to open pdf in Air for Android/Black berry. How i do that?
I want to open .avi file (preferably any video file), to work with that
I want to open a partial view as a JQuery dialog that when I
I want open a path to vim from Screen's copy-mode by Ctrl-A f similarly
I want to open a file from a Class in C# using a Process,

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.