The image on the right (2.3.3) presents my view as i would like it to, however i can't get it to look right on 4.2.2. Notice how the text in the textview is not vertically centered. I've tried both in the emulator and on Galaxy S4. Also, the eclipse ADT preview of XML files shows it centered correctly.
The view is used in a listview.
How do i center the text in my textview so it looks the same on all android versions?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="16dp" >
<ImageView android:id="@+id/fylke_vapen"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:gravity="center"
android:scaleType="fitCenter"
android:src="@drawable/fylke_buskerud" />
<TextView android:id="@+id/fylke_navn"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toRightOf="@id/fylke_vapen"
android:layout_alignBottom="@id/fylke_vapen"
android:layout_alignTop="@id/fylke_vapen"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:textSize="24sp"
android:maxLines="1"
android:text="Placeholder text" />
<CheckBox android:id="@+id/star"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignTop="@id/fylke_vapen"
android:layout_alignBottom="@id/fylke_vapen"
android:gravity="center"
android:button="@drawable/star_checkbox"
android:focusable="false" />
</RelativeLayout>