Android - Вертикальное выравнивание содержимого строки Listview - PullRequest
2 голосов
/ 13 февраля 2012

Я не могу выровнять содержимое строк ListView по середине по вертикали.

Снимок экрана Listview:

Screenshot of Listview

Это мой список строк Listview

1 Ответ

3 голосов
/ 14 февраля 2012

решено

<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>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...