Android listview中嵌套Checkbox的布局文件
效果图如下:
需要注意的地方:
1、设置比例 只是设置中间部分的比例
2、android:id="@+id/name"显示的是文件名称,比如像第二个长度太长,于是设置宽度为android:layout_height="20dip",这样多出来的字就不显示了
android:layout_width="fill_parent" android:layout_height="80dip"
android:orientation="horizontal" android:layout_weight="1">
android:layout_height="fill_parent" >
android:layout_height="40dip" android:layout_weight="1">
android:layout_height="wrap_content" android:text="程序名称 : ">
android:layout_toRightOf="@id/nameLab" android:layout_height="20dip"
android:layout_marginLeft="3dip" android:textColor="#FFD700">
android:layout_height="wrap_content" android:layout_below="@id/name"
android:text="安装时间:">
android:layout_height="wrap_content" android:layout_below="@id/name"
android:layout_alignLeft="@id/name" android:textColor="#FFD700">
android:layout_height="40dip" >
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="false"
android:focusableInTouchMode="false"/>