Trying to figure out to overcome this little problem.
Below, on the left side, is a sample of the view that I'm trying to implement for an app. On the right side is the view that I'm ending up with.
In my xml mock up I've decided to use a RelativeLayout
but I can't get the TextView
to be centered between the top and bottom views.
For reference here's a represenation of my xml code:
<RelativeLayout
android:layout_width:"match_parent"
android:layout_height:"wrap_content">
<ImageView
android:id="@+id/BlackImage"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:layout_alightParentTop="true"
android:layout_centerHorizontal="true"/>
<ImageView
android:id="@+id/RedImage"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:layout_below="@+id/BlackImage"
android:layout_centerHorizontal="true"/>
<TextView
android:id="@+id/TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/BlackImage"
android:layout_centerHorizontal="true"/>
</RelativeLayout>
Any idea what I'm missing, or how to change to get what I want?