Android “获取”按钮在ListView设置为“不可见”后出现
多亏了这里的一位用户的帮助,当按下按钮时,我能够隐藏我的ListView。我想做的是,一旦我按下按钮,它就隐藏了我的ListView,然后在ListView标签外面的按钮替换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 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,这是我需要使用的-我认为您写的方式不对,但非常感谢它帮助我解决了这个问题。