|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | 2 | <androidx.constraintlayout.widget.ConstraintLayout |
3 | | - android:layout_width="match_parent" |
4 | | - android:layout_height="match_parent" |
5 | | - android:layout_marginTop="140dp" |
6 | | - android:backgroundTint="@color/new_background" |
7 | | - xmlns:android="http://schemas.android.com/apk/res/android" |
8 | | - xmlns:app="http://schemas.android.com/apk/res-auto"> |
| 3 | + android:layout_width="match_parent" |
| 4 | + android:layout_height="match_parent" |
| 5 | + xmlns:tools="http://schemas.android.com/tools" |
| 6 | + android:backgroundTint="@color/new_background" |
| 7 | + xmlns:android="http://schemas.android.com/apk/res/android" |
| 8 | + xmlns:app="http://schemas.android.com/apk/res-auto" |
| 9 | + app:layout_behavior="@string/appbar_scrolling_view_behavior" |
| 10 | + > |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + <com.google.android.material.appbar.AppBarLayout |
| 15 | + android:layout_width="0dp" |
| 16 | + android:layout_height="wrap_content" |
| 17 | + app:layout_constraintEnd_toEndOf="parent" |
| 18 | + app:layout_constraintStart_toStartOf="parent" |
| 19 | + app:layout_constraintTop_toTopOf="parent" |
| 20 | + android:id="@+id/toolbarGroup" |
| 21 | + > |
| 22 | + |
| 23 | + <androidx.appcompat.widget.Toolbar |
| 24 | + android:id="@+id/toolbar" |
| 25 | + android:layout_width="match_parent" |
| 26 | + android:layout_height="wrap_content" |
| 27 | + android:background="?attr/colorPrimary" |
| 28 | + android:minHeight="?attr/actionBarSize" |
| 29 | + android:theme="?attr/actionBarTheme" |
| 30 | + tools:layout_editor_absoluteX="0dp" |
| 31 | + tools:layout_editor_absoluteY="0dp" /> |
| 32 | + |
| 33 | + </com.google.android.material.appbar.AppBarLayout> |
9 | 34 |
|
10 | 35 | <fragment |
11 | 36 | android:id="@+id/nav_fragment" |
12 | 37 | android:name="androidx.navigation.fragment.NavHostFragment" |
13 | 38 | android:layout_width="match_parent" |
14 | | - android:layout_height="0dp" |
| 39 | + android:layout_height="wrap_content" |
| 40 | + android:layout_marginTop="?attr/actionBarSize" |
| 41 | + |
15 | 42 | app:defaultNavHost="true" |
16 | | - app:layout_constraintTop_toTopOf="parent" |
| 43 | + app:layout_constraintTop_toBottomOf="@+id/toolbarGroup" |
17 | 44 | app:layout_constraintBottom_toTopOf="@id/bottom_navigation" |
18 | 45 | app:layout_constraintLeft_toLeftOf="parent" |
19 | 46 | app:layout_constraintRight_toRightOf="parent" |
20 | | - app:layout_constraintVertical_bias="0.5" |
| 47 | + app:layout_constraintVertical_bias="0" |
21 | 48 | app:navGraph="@navigation/nav_graph" /> |
22 | 49 |
|
23 | 50 | <com.google.android.material.bottomnavigation.BottomNavigationView |
|
28 | 55 | app:layout_constraintStart_toStartOf="parent" |
29 | 56 | app:layout_constraintEnd_toEndOf="parent" |
30 | 57 | app:layout_constraintBottom_toBottomOf="parent" |
| 58 | + android:fitsSystemWindows="true" |
31 | 59 | app:menu="@menu/main_bottom_nav" |
32 | 60 | app:itemTextColor="@color/bottom_nav_color" |
33 | 61 | app:itemIconTint="@color/bottom_nav_color" /> |
|
0 commit comments