如何将ListView放在上面(z-index)这两个RelativeLayouts?如图所示?
<ListView
android:layout_width="fill_parent"
android:layout_height="150dp"></ListView>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="100dp"></RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="100dp"></RelativeLayout>
答案 0 :(得分:1)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ListView
android:layout_width="wrap_content"
android:layout_height="150dp" >
</ListView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="100dp" >
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="100dp" >
</RelativeLayout>
</LinearLayout>
</FrameLayout>
</LinearLayout>