Can't get Indeterminate ProgressBar to display while ListView is Loading
<p>I am loading a listview that lists all installed apps on the phone. I want the app to display an indeterminate progressbar (the spinning circular one) while the listview is loading.</p>

<pre><code>     final PackageManager pm = this.getPackageManager();

    Intent intent = new Intent(Intent.ACTION_MAIN, null);
    intent.addCategory(Intent.CATEGORY_LAUNCHER);

    final ArrayList&lt;ResolveInfo&gt; list =
            (ArrayList&lt;ResolveInfo&gt;) pm.queryIntentActivities(intent, 
                    PackageManager.PERMISSION_GRANTED);
    for (ResolveInfo rInfo : list)
    {
        Log.i(TAG, ": Installed Applications " + rInfo.activityInfo.
                applicationInfo.loadLabel(pm).toString());
    }

    final ArrayAdapter&lt;ResolveInfo&gt; adapter = 
        new ArrayAdapter&lt;ResolveInfo&gt;(this, R.layout.list_item, list)
        {
        @Override
        public View getView(int position, View convertView, ViewGroup parent)
        {
            if (convertView == null)
                convertView = LayoutInflater.from(parent.getContext()).
                    inflate(R.layout.list_item, parent, false);

            final String text = list.get(position).activityInfo.
                applicationInfo.loadLabel(pm).toString();
            ((TextView)convertView.findViewById(R.id.text)).setText(text);

            final Drawable drawable = list.get(position).activityInfo.applicationInfo.loadIcon(pm);
            ((ImageView)convertView.findViewById(R.id.image)).setImageDrawable(drawable);

            return convertView;
        }

        };
    setListAdapter(adapter);

    ListView lv = getListView();
    lv.setEmptyView(findViewById(R.id.empty));
    lv.setTextFilterEnabled(true);
</code></pre>

<p>Heres the XML:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;

    &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" android:layout_width="fill_parent"
    android:layout_height="fill_parent"&gt;

    &lt;ImageView android:id="@+id/image" 
        android:layout_width="50dp" android:layout_height="50dp" /&gt;
    &lt;TextView android:id="@+id/text"
        android:layout_width="fill_parent" android:layout_height="wrap_content"
        android:padding="10dp" android:textSize="16sp" /&gt;

 &lt;ScrollView
            android:id="@+id/empty" android:layout_width="fill_parent"
            android:layout_height="fill_parent"&gt;
            &lt;ProgressBar android:id="@+id/progressBar1" android:layout_width="wrap_content" 
            android:layout_height="wrap_content"&gt;&lt;/ProgressBar&gt;

        &lt;/ScrollView&gt;

 &lt;/LinearLayout&gt;
</code></pre>

<p>Nothing displays while the listview is loading.... what am I doing wrong???</p>
