大家好(特别是CommonsWare)
我正在尝试使用TouchListView of CommonsWare。
当我打开应用程序时,列表项的移动是可行的,看起来应该是这样的,但是当我移动这个项目时,视图的大小就不同了(假设大小与simple_list_item_1差不多)。
我的排布:
<?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:gravity="center_vertical"
android:ignoreGravity="@+id/icon">
<ImageView android:id="@+id/icon"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/grabber"/>
<TextView
android:id="@+id/label"
android:layout_width="fill_parent"
android:paddingLeft="9dip"
android:layout_height="wrap_content"
android:layout_alignWithParentIfMissing="true"
android:layout_toRightOf="@id/icon"
android:layout_centerVertical="true"
android:textSize="25dip"
android:ellipsize="marquee"
android:singleLine="true"/>
<View
android:id="@+id/groceryCheckedView"
android:layout_centerVertical="true"
android:visibility="gone"
android:focusable="true"
android:background="@color/black"
android:layout_height="2dp"
android:layout_width="fill_parent"/>
<View
android:id="@+id/grocerySeparatorView"
android:background="@color/red"
android:layout_height="1dp"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true"/>
</RelativeLayout>编辑
图片来说明

发布于 2012-02-10 13:11:53
如果我不得不猜测,您还没有正确地设置normal_height属性到您的TouchListView (或者可能是expanded_height)上。需要将normal_height属性设置为行的高度,这需要是一个固定值。您的行高是基于wrap_content的,不能预先确定。
https://stackoverflow.com/questions/9219496
复制相似问题