I have an ImageView (the clock image in the screen shot below) that I’d like to center vertically to the timestamp text (“2 hours ago” in the image) no matter what the text size.

I’ve tried android:layout_centerVertical="true" but it has no effect.
I’ve included the layout code below. What would be the right way to center the clock (id createdTimeImage) vertically to the timestamp text (id createdTime) in a RelativeLayout? Appreciate any pointers in the right direction.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<RelativeLayout
android:id="@+id/fromPictureSection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/square_shape_grey_border"
android:padding="1dip"
android:layout_marginLeft="10dip"
android:layout_marginTop="10dip" >
<ImageView
android:id="@+id/fromPicture"
android:layout_width="50dip"
android:layout_height="50dip"
android:contentDescription="@null" />
</RelativeLayout>
<TextView
android:id="@+id/fromName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/fromPictureSection"
android:paddingLeft="5dip"
android:paddingRight="10dip"
android:paddingTop="12dip"
android:textAppearance="@style/bodyTextStyle" />
<ImageView
android:id="@+id/createdTimeImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/fromName"
android:layout_toRightOf="@id/fromPictureSection"
android:contentDescription="@null"
android:paddingBottom="0dip"
android:paddingLeft="5dip"
android:paddingTop="0dip"
android:layout_centerVertical="true"
android:src="@drawable/clock" />
<TextView
android:id="@+id/createdTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/fromName"
android:layout_toRightOf="@id/createdTimeImage"
android:layout_centerVertical="true"
android:paddingBottom="0dp"
android:paddingLeft="2dip"
android:paddingRight="10dip"
android:paddingTop="0dp"
android:textAppearance="@style/smallGreyTextStyle" />
</RelativeLayout>
You can initialize an image to the
textviewitself