2012-02-09 71 views
0

大家(特别是CommonsWare)TouchListView调整大小视图后降(CommonsWare)

我试图使用CommonsWare的TouchListView。

当我打开应用程序时,列表项的运动起作用并且看起来应该如此,但是随着我移动项目,视图获得不同的大小(认为大小与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> 

编辑

图片说明

illustration

+0

我很抱歉,但我不知道你在说什么。也许考虑附上说明问题的截图。 – CommonsWare 2012-02-10 01:16:09

+0

@CommonsWare对不起,很糟糕的问题。我已添加图片来说明问题。 – Bastaix 2012-02-10 08:31:13

回答

1

如果我猜的话,你有没有正确设置在normal_height属性您TouchListView(或可能的expanded_height)。 normal_height属性需要设置为行的高度,这需要是一个固定值。您的行高是基于wrap_content,事先不可知。

相关问题