Я хочу, чтобы боковое меню содержало только значки, поэтому я хочу увеличить размер значков, чтобы сделать их более заметными. Чтобы увеличить размер значков, поместите его Demens.xml
:
<dimen name="design_navigation_icon_size"
tools:override="true">72dp</dimen>
Это мое меню.file:
<?xml version="1.0" encoding="utf-8"?>
<item android:id="@+id/menu_item_start_new_trip"
android:icon="@drawable/ic_menu_start_new_trip"
/>
<item android:id="@+id/menu_item_edit_current_trip"
android:icon="@drawable/ic_menu_icon_edit_trip"
/>
<item android:id="@+id/menu_item_saved_trip"
android:icon="@drawable/ic_menu_saved_trip"
/>
<item android:id="@+id/menu_item_about"
android:icon="@drawable/ic_question_mak"
/>
</group>
И это мой DrawerLayout:
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout_home_map"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:openDrawer="start"
android:fitsSystemWindows="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/map"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/map"
tools:context=".HomeMapActivity"
android:name="com.google.android.gms.maps.SupportMapFragment" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintVertical_bias="0.0"/>
<include
android:id="@+id/tbHomeMap"
layout="@layout/toolbar_home_map" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintHorizontal_bias="1.0"/>
<androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content"
android:id="@+id/guideline16"
android:orientation="horizontal" app:layout_constraintGuide_end="32dp"/>
<androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content"
android:id="@+id/guideline17"
android:orientation="vertical" app:layout_constraintGuide_end="16dp"/>
<androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content"
android:id="@+id/guideline18"
android:orientation="vertical"
app:layout_constraintGuide_begin="16dp"/>
<ImageButton
android:id="@+id/btnHomeIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_home_page"
android:background="@null"
app:layout_constraintEnd_toStartOf="@+id/guideline17"
app:layout_constraintBottom_toTopOf="@+id/guideline16"/>
<Button
android:paddingEnd="10sp"
android:layout_height="0dp"
android:text="@string/btnStartNewTrip"
android:drawableRight="@drawable/ic_start_new_trip"
android:textSize="@dimen/text_size"
android:textAllCaps="false"
android:background="@drawable/button_baground_blue_no_edge" android:id="@+id/btnStartNewTrip"
app:layout_constraintTop_toTopOf="@+id/btnHomeIcon"
app:layout_constraintBottom_toBottomOf="@+id/btnHomeIcon"
app:layout_constraintStart_toStartOf="@+id/guideline18"
app:layout_constraintEnd_toStartOf="@+id/btnHomeIcon"
android:layout_width="0dp" android:layout_marginEnd="8dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingTop="?attr/actionBarSize"
android:layout_gravity="start"
android:background="@android:color/transparent"
app:menu="@menu/side_bar_navigation_menu"
android:fitsSystemWindows="true"
/>
</androidx.drawerlayout.widget.DrawerLayout>
это изображение значков, когда онибыть урезанным: