title: How to center a progressbar in screen
body: <p>The progress bar is appearing on the left of the screen.  I would want it centered, like in the example.</p>
  
  <p><a href="https://i.stack.imgur.com/aBQBQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aBQBQ.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          android:gravity="center"
          android:background="@drawable/semi_circle"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
  &lt;RelativeLayout
          android:layout_height="wrap_content"
          android:layout_width="match_parent"
          android:layout_marginTop="50dp"
          android:layout_gravity="center_horizontal"
          android:id="@+id/relative"&gt;
  
          &lt;ProgressBar
                  android:id="@+id/progress_bar"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:visibility="visible" /&gt;
  
  
      &lt;LinearLayout android:layout_width="match_parent"
                    android:id="@+id/lilPolicy"
                    android:layout_height="match_parent"
                    android:layout_marginBottom="20dp"&gt;
  
  
      &lt;/LinearLayout&gt;
  </code></pre>