1 <?xml version="1.0" encoding="utf-8"?><!--
2 ~ Copyright © 2021 Damyan Ivanov.
3 ~ This file is part of MoLe.
4 ~ MoLe is free software: you can distribute it and/or modify it
5 ~ under the term of the GNU General Public License as published by
6 ~ the Free Software Foundation, either version 3 of the License, or
7 ~ (at your opinion), any later version.
9 ~ MoLe is distributed in the hope that it will be useful,
10 ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ~ GNU General Public License terms for details.
14 ~ You should have received a copy of the GNU General Public License
15 ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
18 <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
19 xmlns:app="http://schemas.android.com/apk/res-auto"
20 xmlns:tools="http://schemas.android.com/tools"
21 android:layout_width="match_parent"
22 android:layout_height="match_parent"
23 tools:context=".ui.templates.TemplatesActivity"
26 <com.google.android.material.appbar.AppBarLayout
27 android:id="@+id/appbar"
28 android:layout_width="match_parent"
29 android:layout_height="@dimen/app_bar_height"
30 android:fitsSystemWindows="true"
31 android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
33 <com.google.android.material.appbar.CollapsingToolbarLayout
34 android:id="@+id/toolbar_layout"
35 android:layout_width="match_parent"
36 android:layout_height="match_parent"
37 android:fitsSystemWindows="true"
38 app:contentScrim="?attr/colorPrimary"
39 app:layout_scrollFlags="scroll|exitUntilCollapsed"
40 app:toolbarId="@+id/toolbar"
43 <androidx.appcompat.widget.Toolbar
44 android:id="@+id/toolbar"
45 android:layout_width="match_parent"
46 android:layout_height="?attr/actionBarSize"
47 app:layout_collapseMode="pin"
48 app:popupTheme="@style/ThemeOverlay.AppCompat.DayNight"
50 </com.google.android.material.appbar.CollapsingToolbarLayout>
51 </com.google.android.material.appbar.AppBarLayout>
53 <androidx.core.widget.NestedScrollView
54 android:layout_width="match_parent"
55 android:layout_height="match_parent"
56 app:layout_behavior="@string/appbar_scrolling_view_behavior"
58 <androidx.fragment.app.FragmentContainerView
59 android:id="@+id/fragment_container"
60 android:name="androidx.navigation.fragment.NavHostFragment"
61 android:layout_width="match_parent"
62 android:layout_height="match_parent"
63 app:defaultNavHost="true"
64 app:navGraph="@navigation/template_list_navigation"
66 </androidx.core.widget.NestedScrollView>
68 <com.google.android.material.floatingactionbutton.FloatingActionButton
69 android:id="@+id/fabAdd"
70 android:layout_width="wrap_content"
71 android:layout_height="wrap_content"
72 android:layout_gravity="bottom|end"
73 android:layout_margin="@dimen/fab_margin"
74 app:srcCompat="@drawable/ic_add_white_24dp"
75 android:contentDescription="@string/add_button_description"
76 app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior"
79 <com.google.android.material.floatingactionbutton.FloatingActionButton
80 android:id="@+id/fabSave"
81 android:layout_width="wrap_content"
82 android:layout_height="wrap_content"
83 android:layout_gravity="bottom|end"
84 android:layout_margin="@dimen/fab_margin"
85 app:srcCompat="@drawable/ic_save_white_24dp"
86 android:contentDescription="@string/save_button_description"
87 app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior"
90 </androidx.coordinatorlayout.widget.CoordinatorLayout>