从导航视图底部移除白色 space android

remove white space from bottom of navigationview android

移除导航视图底部的白色 space 或填充

Below is navigation view xml with full code (drawer +navigationview+toolbar) I have remove space from top of navigationview using dimen

问题:

I want to remove space from bottom of the navigationview

mainxml

android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/navigationview">

        <RelativeLayout
            android:id="@+id/main"
            android:layout_width="match_parent"
            android:layout_height="match_parent">


            <android.support.v4.widget.DrawerLayout xmlns:app="http://schemas.android.com/apk/res-auto"
                android:id="@+id/drawer_layout"
                android:layout_width="match_parent"
                android:layout_height="match_parent"

                android:background="@color/navigationview"
                tools:openDrawer="start">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical">

                    <android.support.v7.widget.Toolbar
                        android:id="@+id/toolbar"
                        android:layout_width="match_parent"
                        android:layout_height="?attr/actionBarSize"
                        android:layout_gravity="center"
                        android:background="@color/navigationview"
                        android:contentInsetEnd="0dp"
                        android:contentInsetLeft="0dp"
                        android:contentInsetRight="0dp"
                        android:contentInsetStart="0dp"
                        app:contentInsetEnd="0dp"
                        app:contentInsetLeft="0dp"
                        app:contentInsetRight="0dp"
                        app:contentInsetStart="0dp"
                        app:popupTheme="@style/AppTheme.PopupOverlay">

                    </android.support.v7.widget.Toolbar>

                    <FrameLayout
                        android:id="@+id/frame"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:background="@color/white">


                    </FrameLayout>
                </LinearLayout>

                <!-- Side navigation drawer UI -->

                <android.support.design.widget.NavigationView
                    android:clipToPadding="false"
                    android:id="@+id/nav_view"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_gravity="start"
                    app:headerLayout="@layout/navigation_header"
                    app:itemBackground="@color/navigationview"
                    app:itemIconTint="@color/white"
                    app:itemTextColor="@color/white"
                    app:menu="@menu/my_navigation_items">

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


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

    </RelativeLayout>

Below line code is to remove space from top of the navigationview and its worked

<dimen name="design_navigation_separator_vertical_padding">0dp</dimen>

就像我在你的问题的评论中所说的那样:

android:background="your_color"