Fixed center alignment
<p>I need to achieve fixed central alignment, like this in the picture:</p>

<p><a href="http://postimage.org/image/t735us1z3/" rel="nofollow">http://postimage.org/image/t735us1z3/</a></p>

<p>So the flag images are always in the center while the two TextViews are growing to the left and right. So no matter how long the text is going to be the images will still be in the center. And plus the "vs" TextView in the middle.</p>

<pre><code> &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_horizontal"
 &gt;

&lt;TextView android:id="@+id/list_item_entry_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:ellipsize="marquee"
        android:fadingEdge="horizontal"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp"
         /&gt;



     &lt;ImageView 
        android:id="@+id/flag1"
        android:layout_width="20dp"
        android:layout_height="20dp"   
        android:layout_marginLeft="5dp" 
        android:layout_marginRight="5dp" 
        android:src="@drawable/bayern25"
        android:layout_marginTop="5dp" 
      android:layout_toRightOf="@+id/list_item_entry_title"
        /&gt;

       &lt;TextView android:text="-"
             android:id="@+id/text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:ellipsize="marquee"
        android:fadingEdge="horizontal"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp"
         android:layout_toRightOf="@+id/flag1"
         /&gt;


       &lt;ImageView 
        android:id="@+id/flag2"
        android:layout_width="20dp"
        android:layout_height="20dp"  
        android:layout_marginLeft="5dp"  
          android:layout_marginTop="5dp" 
        android:src="@drawable/wolfsburg25"
        android:layout_toRightOf="@+id/text"
        /&gt;


     &lt;TextView android:id="@+id/list_item_entry_summary"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/list_item_entry_title"
        android:layout_alignLeft="@id/list_item_entry_title"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:singleLine="true"
        android:layout_marginLeft="5dp"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp"
        android:layout_toRightOf="@+id/flag2"
         /&gt;
</code></pre>

<p></p>
