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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:51:12+00:00 2026-05-27T17:51:12+00:00

I have used ProgressDialog in Android application. I have a login, password and Loginbtn

  • 0

I have used ProgressDialog in Android application.
I have a login, password and Loginbtn in a main form, when i login, i move to next screen, the login is on the bases of internet and webdomain, means upon login it sends request to online server having php file, which returns true or false, and it then moves to next screen. I want to use ProcessDialog unless it obtains true or false from server, and if it gets false the wheel should stop processing and it should show the message that invalid username or password, and if it gets true, after getting true it should end the process dialog and move to the next screen, right now ProcessDialog is working but when we click, i just start dialog to work, and then automatically intent moves to the next screen, but if we press back button, it still shows process dialog rotating. i just want to use processDialog in a correct way.
My code is

//start
 progressDialog = new ProgressDialog(DomainDownManagerActivity.this);
             progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
             progressDialog.setMessage("Loading...");
             progressDialog.show();
             progressDialog.setProgress(100);

> if (v==true){ 
//v has true 
 Intent intent = new Intent(DomainDownManagerActivity.this,MainPanelActivity.class);

startActivity(intent);

    }

    else{
    //set label of invalid user or pass
    }

Image attached
enter image description 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-05-27T17:51:13+00:00Added an answer on May 27, 2026 at 5:51 pm
    // write this line  `new SomeTask(0).execute();`  in your loginBtn.onCLick 
    /** Inner class for implementing progress bar before fetching data **/
    
      private class SomeTask extends AsyncTask<Void, Void, Integer> 
        {
            private ProgressDialog Dialog = new ProgressDialog(yourActivityClass.this);
            @Override
            protected void onPreExecute()
            {
    
            Dialog.setMessage("loading...");
            Dialog.show();
        }
    
        @Override
        protected Integer doInBackground(Void... params) 
        {
    
    
               //Task for doing something 
     //   get data from php server if true then return
    
                return 0;
        }
    
        @Override
        protected void onPostExecute(Integer result)
            {
    
    
    
           if(result==0)
                {
    //do some thing if true
    Intent intent = new Intent(DomainDownManagerActivity.this,MainPanelActivity.class);
    startActivity(intent);
                }
    
        // after completed finished the progressbar
                Dialog.dismiss();
            }
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hy!! I have a problem with the progressdialog. My used code: package com.android.skiptvad; import
I have used microsoft system.security.cryptography to make md5 in c# application but I need
I have used Broadcast receiver when it restarts it shows the launcher screen but
I wish to create a tab application in Android. I wish to basically have
I have used Shibboleth with manual login, meaning the user clicks the login link
I have used following code for download some files from our internet. public class
I have used Phonegap.1.2.0.js in Window Phone 7 application. All files related html5 and
I have used the jquery auto complete plugin in my rails application and things
Now I am doing an Android application.In my application I have to get the
I have used traditional version control systems to maintain source code repositories on past

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.