I am working on a android application using Phonegap + Jquery mobile, and I have one splash screen shown when starting the app, but it's a static png file, now my customer keep asking for some loading indicator like spinner or progress bar in the splash screen while user waiting the app being loaded.

I follow one example to show progress bar in the splash screen, but it doesn't work, below it's my code.

main java:

```
super.onCreate(savedInstanceState);

final Activity activity = this;
final ProgressBar progessBar1;
View footer = View.inflate(getContext(), R.layout.spinner, null);
root.addView(footer);

progessBar1 = (ProgressBar) findViewById(R.id.progressBar1);

this.appView.setWebChromeClient(new WebChromeClient() {

        public void onProgressChanged(WebView view, int progress) { 
            activity.setProgress(progress * 1000);
            if(progress < 100 && progessBar1.getVisibility() == ProgressBar.GONE) {
                progessBar1.setVisibility(ProgressBar.VISIBLE);
            }
            progessBar1.setProgress(progress);
            if(progress == 100) {
                progessBar1.setVisibility(ProgressBar.GONE);
            }

            Log.d("Progress", progress+"");

         }
    });

super.setIntegerProperty("splashscreen", R.drawable.splash);
super.setStringProperty("loadingDialog", "Wait, loading packages ...");

super.loadUrl("file:///android_asset/www/index.html", 12000);
super.setIntegerProperty("loadUrlTimeoutValue", 12000); 

```

and the spinner.xml in the res/layout:

```
    <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <ProgressBar
        android:id="@+id/progressBar1"
        style="@android:style/Widget.ProgressBar.Horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:maxHeight="10dip"
        android:minHeight="10dip" />

</LinearLayout>

```

but it doesn't show the progress bar.

My questions:

1. anyone can help to point out where i did wrong, thanks.
2. any other way to do this, actually i just want to show a spinner on the splash screen, that will do.