在抽屉布局中覆盖相对布局的图标?

时间:2016-11-16 23:00:13

标签: android android-layout material-design relativelayout android-navigation-drawer

我想在导航抽屉上的相对布局上集成一个按钮。有人可以帮帮我吗?

    <android.support.v4.widget.DrawerLayout
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_alignParentTop="true">

    <!-- The navigation drawer -->
    <RelativeLayout
        android:id="@+id/rela"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:layout_marginRight="-20dp"
        android:background="@android:color/black"></RelativeLayout>


    <RelativeLayout
        android:id="@+id/relad"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="end"
        android:background="@android:color/black">

    <android.support.design.widget.FloatingActionButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@android:drawable/radiobutton_off_background"
        app:fabSize="normal"
        android:layout_marginLeft="-20dp"

        />

    </RelativeLayout>


</android.support.v4.widget.DrawerLayout>

我的浮动按钮出现在里面。但无法覆盖它

screenshot

0 个答案:

没有答案