title: Show progressbar on top of listview in RelativeLayout
body: <p>I have a listview in RelativeLayout which loads the content automatically from an AsyncTask. Now I want to add a horizontal progressbar on top of the listview so that when the element is loading, it shows the progress (not on an overlay). I tried some method but the progressbar does not show up properly. What is the right way to do?</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context=".MainActivity" &gt;
      &lt;ProgressBar
      android:id="@+id/progressBar1"
      style="?android:attr/progressBarStyleHorizontal"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignLeft="@+id/listViewTitle"
      android:layout_alignParentTop="true" /&gt;
  &lt;ListView
      android:id="@+id/listViewTitle"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true" &gt;
  &lt;/ListView&gt;
  </code></pre>
  
  <p></p>