Другие макеты поверх навигационного представления при открытом - PullRequest
0 голосов
/ 24 мая 2019

Мне удалось настроить левое навигационное меню, но у меня возникли проблемы с настройкой раскладки ящиков, чтобы она открывалась над относительной раскладкой и двумя линейными раскладками под панелью навигации. Эти раскладки, кажется, всегда остаются поверх компоновки ящиков.помогите мне. Мне нужно левое меню навигации, чтобы рисовать над всеми макетами.

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

        <android.support.design.widget.AppBarLayout
            android:id="@+id/appBarLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/black">

            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar_main"
                android:backgroundTint="#5B2437"
                android:layout_width="match_parent"
                app:titleTextColor="@color/white"
                app:title="Driver"
                android:layout_height="wrap_content"
                android:background="?attr/colorPrimary"
                android:minHeight="?attr/actionBarSize" />

            <fragment
                android:id="@+id/map"
                android:name="com.google.android.gms.maps.SupportMapFragment"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                tools:context="comp.example.pk.SwiftHomeApp.DriverMapsActivity" />

        </android.support.design.widget.AppBarLayout>

        <android.support.design.widget.NavigationView
            android:id="@+id/nav_view"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:fitsSystemWindows="true"
            app:headerLayout="@layout/driver_nav_header"
            app:menu="@menu/driver_menu">

        </android.support.design.widget.NavigationView>

    <RelativeLayout
        android:id="@+id/customerInfo"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:layout_marginBottom="59dp"
        android:background="@color/white"
        android:orientation="horizontal"
        android:padding="10dp"
        android:visibility="gone">

        <LinearLayout
            android:id="@+id/a"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/customerProfileImage"
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:layout_margin="5dp"
                android:padding="20sp"
                android:src="@drawable/mainicon" />

            <TextView
                android:id="@+id/customerName"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="3dp"
                android:layout_marginTop="2dp"
                android:gravity="left"
                android:paddingBottom="3dp"
                android:paddingLeft="5dp"
                android:paddingRight="3dp"
                android:text="Both Names"
                android:textColor="@color/black"
                android:textSize="19dp" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/a"
            android:background="@color/white"
            android:orientation="horizontal"
            android:weightSum="2">

            <Button
                android:id="@+id/call"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="2dp"
                android:layout_weight="1"
                android:background="@color/white"
                android:drawableBottom="@drawable/phoney"
                android:gravity="center"
                android:paddingBottom="10dp"
                android:text="Call"
                android:textColor="@color/black"
                android:textSize="19dp" />

            <Button
                android:id="@+id/message"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="2dp"
                android:layout_weight="1"
                android:background="@color/white"
                android:drawableBottom="@drawable/ic_message_black_24dp"
                android:gravity="center"
                android:paddingBottom="10dp"
                android:text="Message"
                android:textColor="@color/black"
                android:textSize="19dp" />

        </LinearLayout>
    </RelativeLayout>


    <LinearLayout
        android:id="@+id/bottom"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:orientation="horizontal"
        android:padding="5dp"
        android:weightSum="2">

        <Button
            android:id="@+id/CancelRide"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="2dp"
            android:layout_weight="1"
            android:text="Cancel Ride"
            android:textColor="@color/black"
            android:visibility="visible" />

        <Button
            android:id="@+id/pickup"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="2dp"
            android:layout_weight="1"
            android:text="Pick Up."
            android:textColor="@color/black"
            android:visibility="visible" />

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:orientation="horizontal"
        android:layout_gravity="top"
        android:layout_marginTop="80dp"
        android:padding="5dp"
        android:weightSum="2"
        android:layout_height="wrap_content">

        <android.support.v7.widget.CardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:background="@color/white"
            android:id="@+id/card4">

            <RelativeLayout
                android:layout_width="match_parent"
                android:background="@color/white"
                android:visibility="gone"
                android:id="@+id/error"
                android:layout_height="match_parent"
                android:padding="15dp">

                <Button
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_alignParentLeft="true"
                    android:layout_alignParentStart="true"
                    android:layout_marginTop="19dp"
                    android:background="@color/buttonA"
                    android:text="Your last ride was not completed.Please call us for help."
                    android:textColor="@color/black" />

            </RelativeLayout>
        </android.support.v7.widget.CardView>

        <Switch
            android:layout_width="wrap_content"
            android:background="#D3D3D3"
            android:text="Working"
            android:textColor="@color/black"
            android:layout_marginLeft="2dp"
            android:layout_gravity="center"
            android:paddingLeft="4dp"
            android:paddingRight="4dp"
            android:layout_weight="1"
            android:id="@+id/aswitch"
            android:layout_height="39dp" />

        <Button
            android:id="@+id/payout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="2dp"
            android:layout_weight="1"
            android:text="Pay Me Now"
            android:textColor="@color/black"
            android:visibility="gone" />

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