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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:48:05+00:00 2026-06-09T06:48:05+00:00

Does PhoneGap (more specifically DroidGap for Android) have way to tell when its webview

  • 0

Does PhoneGap (more specifically DroidGap for Android) have way to tell when its webview has been loaded. I’d like to find something like the following for PhoneGap:

Normal WebView Client Creation:

mWebView.setWebViewClient(new WebViewClient() {

   public void onPageFinished(WebView view, String url) {
        // do your stuff here
    }
});

Creating my PhoneGap Webview like this:

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main_activity);

    if (isOnline() == true) {

         WebSettings settings = mWebView.getSettings(); 
        settings.setAllowFileAccess(true);
        settings.setAppCacheEnabled(true);
        settings.setJavaScriptEnabled(true); 

        mWebView.loadUrl("http://myurl.com");


        mWebView.setWebViewClient(new WebViewClient() {

           public void onPageFinished(WebView view, String url) {
               //hide loading image
               findViewById(R.id.imageLoading1).setVisibility(View.GONE);
               //show webview
               findViewById(R.id.mWebView).setVisibility(View.VISIBLE);
            }
        });
    }
    else {
       //hide loading image
        findViewById(R.id.imageLoading1).setVisibility(View.GONE);
        //show webview
        findViewById(R.id.mWebView).setVisibility(View.VISIBLE);

        Intent myIntent = new Intent(getContext(), LoadScreen.class);

        startActivity(myIntent);
        finish();
    }

}

My Main_Activity.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >


     <ImageView android:id="@+id/imageLoading1"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"
        android:visibility="visible"
        android:src="@drawable/splash"
        />

      <WebView android:id="@+id/mWebView"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"
        android:visibility="gone"
        />



</RelativeLayout>
  • 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-09T06:48:07+00:00Added an answer on June 9, 2026 at 6:48 am

    DroidGap does not have a method, since it’s an activity, and not a view. Instead, the CordovaWebViewClient uses its onPageFinished method to send a message to all the plugins when the page has finished loading. This is what plugins can use to determine whether the page has finished. Conversely, you could check for the deviceready event in Javascript, which should be fired after the page has been loaded.

    If you need to know when the WebView has loaded in Java for anything other than plugins, I highly recommend switching to using CordovaWebView and implementing the lifecycle events yourself, since this will give you more control over the augmented view. This also means that you have to make sure that plugins which use activities are handled correctly, otherwise they will break.

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

Sidebar

Related Questions

Does phonegap/callback/cordova have a whitelist on all platforms? Is it implemented the same way
I am experimenting with PhoneGap and Android. Does anyone have an example that shows
Does anybody have experience build app with PhoneGap's Build Service? I followed the steps
Does COUNT(*) have any significant impact for MySQL performance if query already has GROUP
I have created a minimal PhoneGap app that has just this in the index.html:
When you visit phonegap http://phonegap.com/ it says Nitobi has been acquired by Adobe. What
I have PhoneGap app in Android. Now I am ready to publish it, but
Does PhoneGap just use UIWebVIew or is it doing something more then that? Can
Hey Fellow Phonegap Fans. Does anyone have any idea if I can have Phonegap
I have a running JQueryMobile App that Im developing with PhoneGap for Android/IPhone, and

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.