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 android:fitsSystemWindows="true"
25 tools:context=".ui.activity.PatternsActivity"
28 <com.google.android.material.appbar.AppBarLayout
29 android:id="@+id/app_bar"
30 android:layout_width="match_parent"
31 android:layout_height="@dimen/app_bar_height"
32 android:fitsSystemWindows="true"
35 <com.google.android.material.appbar.CollapsingToolbarLayout
36 android:id="@+id/toolbar_layout"
37 android:layout_width="match_parent"
38 android:layout_height="match_parent"
39 android:fitsSystemWindows="true"
40 app:contentScrim="?attr/colorPrimary"
41 app:layout_scrollFlags="scroll|exitUntilCollapsed"
42 app:toolbarId="@+id/toolbar"
45 <androidx.appcompat.widget.Toolbar
46 android:id="@+id/toolbar"
47 android:layout_width="match_parent"
48 android:layout_height="?attr/actionBarSize"
49 app:layout_collapseMode="pin"
50 app:popupTheme="@style/AppTheme.PopupOverlay"
53 </com.google.android.material.appbar.CollapsingToolbarLayout>
54 </com.google.android.material.appbar.AppBarLayout>
56 <androidx.core.widget.NestedScrollView
57 android:layout_width="match_parent"
58 android:layout_height="match_parent"
59 app:layout_behavior="@string/appbar_scrolling_view_behavior"
60 tools:context=".ui.activity.PatternsActivity"
61 tools:showIn="@layout/activity_patterns"
64 <androidx.recyclerview.widget.RecyclerView
65 android:id="@+id/pattern_list"
66 android:layout_width="match_parent"
67 android:layout_height="wrap_content"
70 </androidx.core.widget.NestedScrollView>
71 <com.google.android.material.floatingactionbutton.FloatingActionButton
73 android:layout_width="wrap_content"
74 android:layout_height="wrap_content"
75 android:layout_margin="@dimen/fab_margin"
76 app:layout_anchor="@id/pattern_list"
77 app:layout_anchorGravity="top|end"
78 app:layout_behavior="com.google.android.material.floatingactionbutton.FloatingActionButton$Behavior"
79 app:srcCompat="@drawable/ic_add_white_24dp"
82 </androidx.coordinatorlayout.widget.CoordinatorLayout>