【问题标题】:Android - Vertical align of Listview row contentAndroid - Listview 行内容的垂直对齐
【发布时间】:2012-03-04 19:29:12
【问题描述】:

我无法在中间垂直对齐 ListView 行的内容。

列表视图截图:

Its my Listview row layout

【问题讨论】:

    标签: android listview row alignment


    【解决方案1】:

    已解决

    <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>
    

    【讨论】:

      猜你喜欢
      • 2011-04-28
      • 1970-01-01
      • 2016-10-19
      • 2015-03-07
      • 1970-01-01
      • 2016-11-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多