I have a custom list view that looks like this:
<image><textview1> <textview2>
Here's the XML file:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/leader_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:orientation="horizontal"
android:weightSum="2" >
<!-- heart icon and username -->
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginLeft="20dp"
android:paddingLeft="10dp"
android:gravity="center"
android:layout_marginRight="5dp" >
<ImageView
android:id="@+id/leader_heart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:src="@drawable/tt_heart_icon"
/>
<TextView
android:id="@+id/leader_username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_toRightOf="@id/leader_heart"
android:gravity="center"
android:textColor="@color/light_blue"
android:textSize="14sp"/>
</RelativeLayout>
<!-- like total -->
<TextView
android:id="@+id/leader_like_total"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_marginRight="20dp"
android:gravity="center"
android:textColor="@color/dark_grey"
android:textSize="15sp"/>
</LinearLayout>
Right now the text looks like this:
<img><texthere> <text>
<img><text> <text>
<img><biggertexthere> <text>
Is there anyway to rearrange the left-hand column such that the textviews are lined up with their first characters but still be centered within the parent? I.e.:
<img><texthere> <text>
<img><text> <text>
<img><biggertexthere> <text>
Edit:
Here's what I would like to achieve:
<header1> <header2>
<img><texthere> <othertext>
<img><text> <othertext>
<img><textherhehr> <othertext>