title: how to set android progress bar in center of the screen
body: <p>I am trying to show the progress bar in the center of the screen, but it doesn't show up in the center. Below is my layout. What am i doing wrong here? Basically this is a layout to show image and android gallery widget on top. When the user clicks on the thumbnails, I am loading an image from the web and I want to show the progress dialog while the image is loading.</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
      android:id="@+id/container" android:layout_width="fill_parent"
      android:layout_height="fill_parent" android:orientation="vertical"&gt;
  
      &lt;Gallery android:id="@+id/gallery" android:layout_width="fill_parent"
          android:layout_height="wrap_content" android:gravity="top" /&gt;
  
      &lt;ImageView android:id="@+id/actualimage" android:scaleType="fitCenter"
          android:layout_width="fill_parent" android:layout_height="wrap_content"
          android:visibility="gone" android:layout_gravity="center_vertical|center_horizontal|center"
          android:adjustViewBounds="true" /&gt;
  
      &lt;ProgressBar android:id="@+android:id/progress_small1"
          android:layout_height="wrap_content" android:layout_width="wrap_content"
          android:visibility="visible" android:layout_gravity="center_vertical|center_horizontal"
          android:gravity="center_vertical|center_horizontal" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>