Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.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 “获取”按钮在ListView设置为“不可见”后出现_Android_Listview_Button - Fatal编程技术网

Android “获取”按钮在ListView设置为“不可见”后出现

Android “获取”按钮在ListView设置为“不可见”后出现,android,listview,button,Android,Listview,Button,多亏了这里的一位用户的帮助,当按下按钮时,我能够隐藏我的ListView。我想做的是,一旦我按下按钮,它就隐藏了我的ListView,然后在ListView标签外面的按钮替换ListView所在的空间 代码如下: <ListView android:id="@android:id/list" android:layout_height="fill_parent" android:layout_width="fill_parent" and

多亏了这里的一位用户的帮助,当按下按钮时,我能够隐藏我的ListView。我想做的是,一旦我按下按钮,它就隐藏了我的ListView,然后在ListView标签外面的按钮替换ListView所在的空间

代码如下:

<ListView android:id="@android:id/list" android:layout_height="fill_parent"
            android:layout_width="fill_parent" 

            android:scrollbarAlwaysDrawVerticalTrack="true" android:fadingEdge="none">

    </ListView>
    <Button android:text="Arsenal" android:id="@+id/arsenal" android:layout_width="wrap_content" android:layout_height="wrap_content"> </Button>


再次感谢您的帮助。

使用View.INVISIBLE代替View.GONE

谢谢您的回答-我所做的是使用View.INVISIBLE代替View.GONE,这是我需要使用的-我认为您写的方式不对,但非常感谢它帮助我解决了这个问题。