Как убрать границу между заголовком навигации и элементами в представлении навигации - PullRequest
0 голосов
/ 16 мая 2019

Это мой навигационный ящик.

enter image description here

Я хочу убрать пустое пространство у стрелки. Я не мог понять, как это работает. Я надеюсь, что есть способ удалить эту границу.

Вот мой код: В деятельности:

<com.google.android.material.navigation.NavigationView
    android:id="@+id/nav_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:fitsSystemWindows="true"
    app:menu="@menu/drawer_view"
    app:headerLayout="@layout/nav_header"
    app:itemBackground="@drawable/nav_view_item_selector"
    />

Заголовок:

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/header_height"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/nav_header_background">

<ImageView
    android:id="@+id/ivNavHeader"
    android:layout_width="60sp"
    android:layout_height="60sp"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    android:layout_marginTop="40sp"
    android:layout_marginLeft="20sp"
    android:layout_marginStart="20sp"
    android:contentDescription="@null"
    android:src="@drawable/ic_add_white_48dp"/>

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:layout_constraintLeft_toLeftOf="@id/ivNavHeader"
    app:layout_constraintTop_toBottomOf="@+id/ivNavHeader"
    android:layout_marginTop="8sp"
    android:text="@string/app_name"
    android:textColor="@color/white"
    android:textSize="24sp"
    android:textStyle="bold"
    android:typeface="serif"/>

</androidx.constraintlayout.widget.ConstraintLayout>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...