This repository was archived by the owner on Jun 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathfragment_bottom_nav.xml
More file actions
34 lines (30 loc) · 1.39 KB
/
fragment_bottom_nav.xml
File metadata and controls
34 lines (30 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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/bottom_nav_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.example.android.navigationsamples.BottomNavFragment">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/bottom_nav_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
app:menu="@menu/toolbar"
app:titleTextColor="@android:color/white" />
<!-- Do not add: app:navGraph="@navigation/graph"
or: android:name="androidx.navigation.fragment.NavHostFragment" -->
<androidx.fragment.app.FragmentContainerView
android:id="@+id/bottom_nav_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
app:menu="@menu/bottom_nav" />
</LinearLayout>