【发布时间】:2015-08-26 13:00:04
【问题描述】:
我有一个片段的布局:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<include layout="@layout/header" />
</FrameLayout>
<ListView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none" >
</ListView>
</LinearLayout>
</FrameLayout>
这是标题:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<LinearLayout
android:id="@+id/box"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone" />
</LinearLayout >
现在,当按下按钮时,“框”应该被填充并变得可见,并且框覆盖了其余的视图(在我的例子中是列表视图)。现在,当我按下按钮时,ox 不会覆盖 listview,而是占据屏幕的一部分(并且 listview 会向下移动)。 我能怎么做?谢谢
【问题讨论】:
标签: android listview android-framelayout