Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 是否可以在ExpandableListView下拥有某些内容?_Android_Android Widget - Fatal编程技术网

Android 是否可以在ExpandableListView下拥有某些内容?

Android 是否可以在ExpandableListView下拥有某些内容?,android,android-widget,Android,Android Widget,我无法创建我将要使用的布局 <LinearLayout> <TextView/> <ExpandableListView/> <Button/> </LinearLayout> 我可以滚动我的可扩展列表视图 --------------------- | some text which | | could be dragable | |-------------------| | - item4

我无法创建我将要使用的布局

<LinearLayout>
    <TextView/>
    <ExpandableListView/>
    <Button/>
</LinearLayout>
我可以滚动我的可扩展列表视图

---------------------
|  some text which  |
| could be dragable |
|-------------------|
|  - item4        | |
|  - item5        | |
|  - item6        | |
|  - item7        | |
|  - item8        | |
|  - item9       [|]|
|-------------------| 
| [button] [button] |
---------------------
但在景观方面

------------------------------|
|   some text which could be  |
|          dragable           |   
|-----------------------------|
|-----------------------------| 
|      [button][button]       |
-------------------------------
我没有可扩展列表视图的位置。我应该如何实现完全可滚动的结果

is it possible?
是的,这是可能的,我们可以将任何小部件(按钮或文本视图)放在可扩展列表视图的上方或下方

最好发布用于创建布局的代码。因此,我们将很容易了解确切的问题

例如:

<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>


/>是一把钥匙!谢谢!:)@有一次我想指出关于“Wrap_content”的问题,我已经在回答中告诉过你,你应该把你到目前为止所做的xml布局放进去,没有它我们怎么知道问题出在哪里?
<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>