2011-02-14 82 views
1

我不能创建布局,其中我将有是否有可能在ExpandableListView下有东西?

<LinearLayout> 
    <TextView/> 
    <ExpandableListView/> 
    <Button/> 
</LinearLayout> 

一般我不能够建立一个布局控件ExpandableListView下,这可能吗?

[编辑]

现在我有另一个问题。目前,我有这样的事情:

--------------------- 
| some text which | 
| could be dragable | 
|-------------------| 
|ExpandableList [|]| 
| - item1  | | 
| - item2  | | 
| - item3  | | 
| - item4  | | 
| - item5  | | 
|-------------------| 
| [button] [button] | 
--------------------- 

我可以滚动我的扩展列表视图

--------------------- 
| some text which | 
| could be dragable | 
|-------------------| 
| - item4  | | 
| - item5  | | 
| - item6  | | 
| - item7  | | 
| - item8  | | 
| - item9  [|]| 
|-------------------| 
| [button] [button] | 
--------------------- 

但在景观

------------------------------| 
| some text which could be | 
|   dragable   | 
|-----------------------------| 
|-----------------------------| 
|  [button][button]  | 
------------------------------- 

我不具备可扩展列表视图的地方。我应该如何实现完全可滚动的结果?

+0

我已经告诉你答案,你应该把XML的布局,你已经完成的工作,没有它我们怎么会知道什么是问题? – 2011-02-14 12:08:33

回答

3
is it possible? 

是的,这是可能的,我们可以在高于或可膨胀的列表视图的下面提出的任何部件(按钮或TextView的)。

最好是发布您用于创建布局的代码。所以我们会很容易地知道确切的问题。

例如:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"> 

    <ExpandableListView 
     android:id="@+id/expandableListView1" 
     android:layout_height="wrap_content" 
     android:layout_width="fill_parent"> 
    </ExpandableListView> 

    <Button 
       android:text="Button" android:id="@+id/button2"    
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content"> 
    </Button> 

</LinearLayout> 
+0

android:layout_height =“wrap_content” />是一个关键!谢谢! :) – noisy 2011-02-14 09:42:19