How to run progressDialog inside WebView ?

by teeming » Sat, 24 Apr 2010 01:48:37 GMT

Sponsored Links

I am new to android development. I wanted to create an app that
displaying a progressDialog when loading the webpage using
webview.loadurl. However i couldn't make my code run. The app is
loaded with error in the emulator. Below is my code. Hope anybody can
help me trace the problem. Thanks.

package hello.WebView;

import android.view.KeyEvent;
import android.webkit.*;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

public class HelloWebView extends Activity implements Runnable {

        WebView webview;
        private ProgressDialog pd;
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {


        public boolean onKeyDown(int keyCode, KeyEvent event) {

                pd =, "", "Loading...", true,

                Thread thread = new Thread(this);

                return super.onKeyDown(keyCode, event);

        public void run() {

                webview.loadUrl(" ");

        private Handler handler = new Handler() {
                public void handleMessage(Message msg) {




How to run progressDialog inside WebView ?

by Kumar Bibek » Mon, 26 Apr 2010 13:39:48 GMT

 You can put a progressbar inside a WebView and set or unset it's
visibility. That should solve your problem.

Thanks and Regards,
Kumar Bibek


Sponsored Links

Other Threads

1. LG Cookie Pep GD510 Price

The GD510 Pop touch screen feature phone. users can listen to plenty
of music and watch movies, or they can create their own memories with
the GD510^s 3.0 megapixel camera. The GD510 will also launch with an
optional solar panel add-on that will fit onto the back of the device
for charging the battery with the power of the sun.

The key features of the new LG Cookie Pep GD510 mobile phone are:
      3 MP Camera
      3-inch TFT Resistive Touch Screen
      Music player, Video player
      Facebook, MySpace, Twitter integration
      Bluetooth, USB
      Video Records
      8GB MicroSD
      Silver, Black Colour
      3hrs 20min Talk time with Standard Battery
      MP3, Polyphonic Ringtone Type

To know more about LG Cookie Pep GD510 price and features visit:


2. How to store a drawable in database?

Hi folks,
is there anyway that I can store drawables into database?


3. communicate between java & javascript (i.e. pass string)

4. Resource Directory Qualifier Limitation?

5. HTC EVO RTSP issues... Anyone experience issues in this area?

6. Adding a new Java SSL Provider

7. onCreate, onStop..... super.onCreate, super.onStop... called before code or after?