1

i am trying to show make ui where navigation drawer shows below toolbar something like this

i want the navigation bar to display under tool bar so i added marign to the navigation view.

but it is actually coming out like this output screen it is adding a padding/margin of 16 dp at the top with a darker shade at the top. i tried this but it is not working.can anyone help?

and the appcompat version is 28.0.0 can anyone help

<android.support.v4.widget.DrawerLayout
    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/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start"
    android:background="@color/secondaryColor">

    <include
        android:id="@+id/include_layout_home_screen"
        layout="@layout/activity_home_screen"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <android.support.design.widget.NavigationView
        android:id="@+id/nav_drawer"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        android:background="@color/primaryColor"
        app:itemTextColor="@color/colorLabelGreyed"
        app:itemIconTint="@color/secondaryColor"
        app:menu="@menu/activity_naviagtion_drawer_drawer"
        android:layout_marginTop="84dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_gravity="bottom"
            android:paddingBottom="24dp"
            android:paddingLeft="16dp">
            <android.support.v7.widget.AppCompatImageView
                android:id="@+id/facebook_btn"
                android:layout_gravity="center_vertical"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:src="@drawable/ic_facebook_icon"
                android:paddingRight="10dp"/>
            <android.support.v7.widget.AppCompatImageView
                android:id="@+id/instagram_btn"
                android:layout_gravity="center_vertical"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:src="@drawable/ic_instagram_icon"
                android:paddingRight="10dp"/>

            <android.support.v7.widget.AppCompatImageView
                android:id="@+id/twitter_btn"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:layout_gravity="center_vertical"
                android:paddingRight="10dp"
                android:src="@drawable/ic_twitter_icon" />
        </LinearLayout>

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

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




<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_weight="1"
    android:focusableInTouchMode="true">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appBarLayout"
        android:layout_width="match_parent"
        android:layout_height="@dimen/app_bar_height"
        android:theme="@style/AppTheme.AppBarOverlay"
        android:background="@color/primaryDarkColor"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">
        <include
            android:layout_width="match_parent"
            android:layout_height="@dimen/app_bar_height"
            layout="@layout/app_toolbar"/>
    </android.support.design.widget.AppBarLayout>
shruti
  • 117
  • 1
  • 11

0 Answers0