2

I can't align the content of ListView rows vertically on middle.

Screenshot of Listview:

Screenshot of Listview

Its my Listview row layout

Cosmologist
  • 508
  • 1
  • 5
  • 16

1 Answers1

3

SOLVED

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_centerVertical="true">

    <Button android:id="@+id/open"
               android:layout_height="wrap_content"
               android:layout_width="wrap_content"
               android:text="Open"
               android:layout_centerVertical="true"
            />

    <CheckBox android:id="@+id/check"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerVertical="true"
              android:layout_toRightOf="@id/open"
            />

    <TextView android:text="@+id/label"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/label"
              android:textSize="16px"
              android:layout_toRightOf="@id/check"
            />

</RelativeLayout>
Cosmologist
  • 508
  • 1
  • 5
  • 16