Android 此界面的最佳父布局?

Android 此界面的最佳父布局?,android,android-layout,Android,Android Layout,我正在尝试找出构建此接口的最佳父布局 以下是一些附加信息/要求: A) 包含所有内容的视图组 B) 填充可用垂直间距的地图视图 C) 水平滚动项目列表的RecylcerView。具有固定高度(即200 dp) D) FloatingAction按钮位于视图B+C的顶部。它是视图C右上角的锚点 我尝试了许多不同的选项来查看a,但它们似乎不起作用 线性布局:线性布局没有Z索引的概念,因此 我的按钮被切断了 RelativeLayout:RelativeLayout没有“填充剩余垂直空间”的概念,

我正在尝试找出构建此接口的最佳父布局

以下是一些附加信息/要求:

A) 包含所有内容的视图组

B) 填充可用垂直间距的地图视图

C) 水平滚动项目列表的RecylcerView。具有固定高度(即200 dp)

D) FloatingAction按钮位于视图B+C的顶部。它是视图C右上角的锚点

我尝试了许多不同的选项来查看a,但它们似乎不起作用

  • 线性布局:线性布局没有Z索引的概念,因此 我的按钮被切断了
  • RelativeLayout:RelativeLayout没有“填充剩余垂直空间”的概念,因此地图视图的高度不是动态的,需要固定
  • 框架布局:与RelativeLayout的问题相同
另外,当用户点击floatingAction按钮时,我需要将片段模式注入到这个活动中,因此它将被放置在当前布局上


任何帮助都将不胜感激。非常感谢你

可能类似于-

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/layout_a"
            xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

<android.support.v7.widget.RecyclerView
        android:id="@+id/layout_c"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:layout_alignParentBottom="true"/>


<com.google.android.gms.maps.MapView
        android:id="@+id/layout_b"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@id/layout_c"/>


<android.support.design.widget.FloatingActionButton
        android:id="@+id/fab_d"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:layout_marginBottom="200dp"
        android:layout_marginRight="16dp"
        app:fabSize="normal"/>

</RelativeLayout>


要切换到新屏幕,您有很多选择。您可以启动新活动、启动DialogFragment或将framelayout添加到填充整个屏幕的相对布局中。谢谢!我猜这里的关键是mapView的
android:layout\u上面的
属性,它允许它填充垂直间距!