ListView怎么布局啊??

解决方案 »

  1.   

    用PreferenceScreen,具体方法搜索一下吧
      

  2.   

    http://blog.csdn.net/ch_984326013/article/details/6628951
      

  3.   

    如果是标准设置的activity,那么只要用PreferenceActivity就可以了,如果是自己布局,那么参考xml如下:<?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:layout_height="wrap_content"
    android:padding="5dip">
    <CheckBox android:id="@+id/cb_select"
    android:layout_alignParentRight="true" android:layout_width="wrap_content"
    android:layout_height="wrap_content">
    </CheckBox>
    <LinearLayout android:layout_width="fill_parent"
    android:orientation="vertical" android:layout_height="wrap_content"
    android:layout_toLeftOf="@id/cb_select" android:paddingLeft="10dip">
    <TextView android:text="This is the title" android:textColor="#FFFFFFFF"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:textSize="24sp">
    </TextView>
    <TextView android:text="This is the sumary" android:textColor="#FF7F7F7F"
    android:layout_width="wrap_content" android:layout_height="wrap_content">
    </TextView>
    </LinearLayout>
    </RelativeLayout>另外,你需要写CheckBox的监听,需要设置ListView的属性android:focusable="false" android:focusableInTouchMode="false",否则它的ItemClick会监听不到。
      

  4.   

    PreferenceScreen就可以了哇,楼上的那个分享到新浪微博是人家图片上的效果。