title: Align TextView below an ImageButton in a Relative Layout
body: <p>I'm having difficulties in aligning center a text view below an image button though I tried the property android:gravity="center", the first two text views are aligned in center of the corresponding image buttons, but the third one didn't fit well
  here is my xml code:
         </p>
  
  <pre><code>&lt;ImageView
      android:id="@+id/view"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_centerHorizontal="true"
      android:scaleType="fitXY"
      android:background="@null"
      android:src="@drawable/imageview" /&gt;
  
  
  &lt;ImageButton
      android:id="@+id/recBook"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignLeft="@+id/textViewBook"
      android:layout_alignParentTop="true"
      android:layout_marginLeft="30dp"
      android:layout_marginTop="107dp"
      android:background="@null"
      android:scaleType="fitXY"
      android:src="@drawable/recipebook" /&gt;
  
  &lt;TextView
      android:id="@+id/textViewBook"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_below="@+id/recBook"
      android:layout_marginLeft="33dp"
      android:text="@string/BookTV"
      android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
  &lt;ImageButton
      android:id="@+id/search"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_above="@+id/textViewBook"
      android:layout_marginLeft="60dp"
      android:layout_toRightOf="@+id/textViewBook"
      android:background="@null"
      android:scaleType="fitXY"
      android:src="@drawable/search" /&gt;
  
  &lt;TextView
      android:id="@+id/textViewSearch"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBaseline="@+id/textViewBook"
      android:layout_alignBottom="@+id/textViewBook"
      android:layout_marginLeft="37dp"
      android:layout_toRightOf="@+id/textViewBook"
      android:text="@string/Search"
      android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
  &lt;ImageButton
      android:id="@+id/favorite"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignLeft="@+id/recBook"
      android:layout_centerVertical="true"
      android:background="@null"
      android:scaleType="fitXY"
      android:src="@drawable/favorites" /&gt;
  
  &lt;TextView
      android:id="@+id/textViewFav"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_="@+id/favorite"
      android:layout_alignLeft="@+id/textViewBook"
      android:layout_below="@+id/favorite"
      android:text="@string/FavTV"
      android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>