2013-04-17 60 views
0

我有一个expandablelistview和以上,有一个相对布局,其中包含一个图像。我想同时滚动列表视图和上述布局?可能吗 ?多滚动视图android

<RelativeLayout 
    android:id="@+id/thumbnail" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignParentLeft="true" 
    android:layout_marginLeft="15dip" 
    android:layout_marginTop="38dip" 
    android:padding="3dip" > 

     <ImageView 
      android:id="@+id/list_image" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:background="@drawable/sss" /> 
    </RelativeLayout> 

<RelativeLayout 
    android:id="@+id/topbarsecond" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"> 

<ExpandableListView 
    android:id="@+id/expandableListView1" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_marginLeft="5dip" 
    android:layout_marginRight="5dip" 
    android:layout_marginBottom="25dip" 
    android:layout_marginTop="5dip" 
    android:layout_alignParentLeft="true" 
    android:cacheColorHint="#00000000" 
    android:divider="#d6d7da" 
    android:dividerHeight="5dp" 
    android:groupIndicator="@null" 
    android:layout_alignParentTop="true" > 
</ExpandableListView> 

回答

0

您可以将RelativeLayout添加为ExpandableListView的HeaderView。

ListView#addHeaderView(View v) 

请参考this

2

只要把所有的意见(包括ListView控件)成布局,然后把它放到一个滚动型

0

因为名单已经默认添加另一个滚动视图可能无法正常工作滚动型,因此尝试在没有列表视图的情况下在封闭布局中放置单独的滚动视图,这可能会解决您的目的。