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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:17:21+00:00 2026-06-01T18:17:21+00:00

I am trying to display image before the page is fully loaded in a

  • 0

I am trying to display image before the page is fully loaded in a webView but the webview is displaying blank for few moment and then displaying the desided page the amount of time its showing blank screen i want to display some image.I am using webview inside viewpager.

i have tried onPageStarted,onPageFinished method but without any success.

Here is the code:

       web.setWebViewClient(new WebViewClient() {
                    // load url
                    public boolean shouldOverrideUrlLoading(WebView view, String url) {
                        view.loadUrl(url);
                        return true;
                    }

                    // when finish loading page
                    public void onPageFinished(WebView view, String url) {
                        web.setVisibility(View.VISIBLE);
                        image.setVisibility(View.GONE);
                    }
                });

                    <ImageView
                        android:id="@+id/imageviewloading"
                        android:layout_width="wrap_content"
                        android:layout_height="0dip"
                        android:layout_gravity="center"
                        android:layout_weight="1"
                        android:contentDescription="@string/app_name"
                        android:src="@drawable/photo_downloading" />

                    <WebView
                        android:id="@+id/website"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:visibility="gone" />
                </LinearLayout>
  • 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-01T18:17:23+00:00Added an answer on June 1, 2026 at 6:17 pm

    Its

       webview.setWebChromeClient(new WebChromeClient() { 
             public void onProgressChanged(WebView view, int progress) {   
                           // Activities and WebViews measure progress with different scales.    
             // The progress meter will automatically disappear when we reach 100% 
                activity.setProgress(progress * 1000);  
                 }
                  });
    

    which did the trick for me

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

Sidebar

Related Questions

I am trying to hide an image/div using display:none until the page loads, then
I'm trying to display an image in a WebView in an Android app. The
I am trying to get an image to display on a page using a
I'm trying to display an image before the list in a listactivity. If I
i am trying to read an image with ITK and display with VTK. But
So I'm trying to display an image that is ouside the path of my
I am trying to display a Loading Image in a new JFrame when the
I'm trying to display an update progress loading image whenever my update panel does
I am trying to display a bytearray as a resized image. The Image is
I am trying to make the image title display at the same time the

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.