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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:18:36+00:00 2026-05-27T21:18:36+00:00

I have Webview application that uses progress bar dialog. It works fine but the

  • 0

I have Webview application that uses progress bar dialog. It works fine but the issue is that the URL i’m showing is a basic form where a user has to enter some information.

The progress bar loads every time a user hits a button to do some action. the progress bar in this app and the loading message in the webpage overlap each other. you could see both of them showing up in the same time at the second and third page.

How do I get the progress bar in my app to function only one time, and that would be when the first page loads. Here’s my activity:

     public class Webform extends Activity {

private WebView webview;
private ProgressDialog progressDialog;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.webform);
    webview = (WebView) findViewById(R.id.webview);

    final Activity activity = this;

    webview.loadUrl("http://www.ccsuhealth.mobi");
    webview.getSettings().setJavaScriptEnabled(true);
    webview.setWebViewClient(new WebViewClient() {
        public boolean shouldOverrideUrlLoading(WebView view, String url) {              
            view.loadUrl(url);
            return true;
        }


        public void onLoadResource (WebView view, String url) {
            if (progressDialog == null) {
                progressDialog = new ProgressDialog(activity);
                progressDialog.setMessage("Loading... ");
                progressDialog.show();
            }
        }

         public void onPageFinished(WebView view, String url) {
            if (progressDialog.isShowing()) {
                progressDialog.dismiss();
                progressDialog = null;
                progressDialog.cancel();
            }
        }


        public void onReceivedError(WebView view, int errorCode,
                String description, String failingUrl) {
            Toast.makeText(Webform.this, "Your Internet Connection May not be active Or " + description , Toast.LENGTH_LONG).show();
        }


    }); 

}
  • 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-27T21:18:36+00:00Added an answer on May 27, 2026 at 9:18 pm

    If I understand you correctly, you want to show the progress bar only on the first page (the login page), but not on the subsequent pages. Here is how to do it:

    1. Implement the onPageStated event and activate the progress bar in there — but only if the URL matches your desired login page URL.
      http://developer.android.com/reference/android/webkit/WebViewClient.html#onPageStarted(android.webkit.WebView, java.lang.String, android.graphics.Bitmap)

    2. Implement the WebChromeClient.onProgressChange event. Set the progress bar progress in onProgressChange — but only if the progress bar is visible.

      http://developer.android.com/reference/android/webkit/WebChromeClient.html#onProgressChanged(android.webkit.WebView, int)

    3. Implement the onPageFinished event and hide the progress bar in there.

      http://developer.android.com/reference/android/webkit/WebViewClient.html#onPageFinished(android.webkit.WebView, java.lang.String)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an application that loads a website using WebView. Everything works fine
I have created a mac application using the WebView. But issue is that webView
I have an iPad application that uses WebViews to display a list of URL's.
I have a Cocoa app that uses a WebView to display an HTML interface.
I have an Android application that is a TabHost with a WebView. I use
In my cocoa application I have a WebView. If I set that WebView to
I want to add a webview to my layout.But that layout have few other
I have a Android 2.1 application with a WebView. In that WebView I want
I have a WebView application that plays music with a flash player and I
I'm developing an Android application that uses a WebView to display the login page

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.