1 <?xml version="1.0" encoding="utf-8"?><!--
2 ~ Copyright © 2020 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:id="@+id/main_app_layout"
22 android:layout_width="match_parent"
23 android:layout_height="match_parent"
24 android:background="?android:attr/colorBackground"
25 android:orientation="vertical"
26 tools:context=".ui.activity.MainActivity">
29 <com.google.android.material.floatingactionbutton.FloatingActionButton
30 android:id="@+id/btn_add_transaction"
31 android:layout_width="wrap_content"
32 android:layout_height="wrap_content"
33 android:layout_gravity="bottom|end"
34 android:layout_margin="@dimen/fab_margin"
35 app:backgroundTint="?colorSecondary"
36 app:layout_constraintBottom_toBottomOf="parent"
37 app:layout_constraintEnd_toEndOf="parent"
38 app:maxImageSize="36dp"
39 app:srcCompat="@drawable/ic_add_white_24dp"
42 <androidx.drawerlayout.widget.DrawerLayout
43 android:id="@+id/drawer_layout"
44 android:layout_width="match_parent"
45 android:layout_height="match_parent"
46 tools:openDrawer="start">
48 <androidx.constraintlayout.widget.ConstraintLayout
49 android:id="@+id/pager_layout"
50 android:layout_width="match_parent"
51 android:layout_height="match_parent">
53 <androidx.appcompat.widget.Toolbar
54 android:id="@+id/toolbar"
55 android:layout_width="match_parent"
56 android:layout_height="@dimen/toolbar_height"
57 android:background="?colorPrimary"
58 android:theme="@style/AppTheme.AppBarOverlay"
59 app:popupTheme="@style/AppTheme.PopupOverlay"
60 app:layout_constraintTop_toTopOf="parent"
61 app:layout_constraintStart_toStartOf="parent"
62 app:layout_constraintEnd_toEndOf="parent"/>
65 android:id="@+id/main_header"
66 android:layout_width="match_parent"
67 android:layout_height="wrap_content"
68 android:orientation="vertical"
69 app:layout_constraintEnd_toEndOf="parent"
70 app:layout_constraintStart_toStartOf="parent"
71 app:layout_constraintTop_toBottomOf="@id/toolbar">
74 android:id="@+id/transaction_progress_layout"
75 android:layout_width="match_parent"
76 android:layout_height="wrap_content"
77 android:gravity="center_vertical"
78 android:orientation="horizontal"
79 android:visibility="gone">
82 android:id="@+id/transaction_list_progress_bar"
83 style="?android:attr/progressBarStyleHorizontal"
84 android:layout_width="0dp"
85 android:layout_height="wrap_content"
86 android:layout_marginTop="-8dp"
87 android:layout_marginBottom="-7dp"
88 android:layout_weight="1"
89 android:indeterminate="true"
92 android:progressTint="?colorPrimary"
93 app:layout_constraintEnd_toEndOf="parent"
94 app:layout_constraintStart_toStartOf="parent" />
97 android:id="@+id/transaction_list_cancel_download"
98 android:layout_width="wrap_content"
99 android:layout_height="wrap_content"
100 android:background="@drawable/ic_clear_accent_24dp"
101 android:clickable="true"
102 android:focusable="true"
103 android:onClick="onStopTransactionRefreshClick" />
108 <androidx.viewpager.widget.ViewPager
109 android:id="@+id/root_frame"
110 android:layout_width="match_parent"
111 android:layout_height="0dp"
112 app:layout_constraintBottom_toBottomOf="parent"
113 app:layout_constraintEnd_toEndOf="parent"
114 app:layout_constraintStart_toStartOf="parent"
115 app:layout_constraintTop_toBottomOf="@+id/main_header">
117 </androidx.viewpager.widget.ViewPager>
120 android:layout_width="0dp"
121 android:layout_height="?attr/main_header_shadow_height"
122 android:background="@drawable/drop_shadow"
123 app:layout_constraintEnd_toEndOf="parent"
124 app:layout_constraintStart_toStartOf="parent"
125 app:layout_constraintTop_toBottomOf="@id/main_header" />
128 </androidx.constraintlayout.widget.ConstraintLayout>
130 <include layout="@layout/main_navigation" />
132 </androidx.drawerlayout.widget.DrawerLayout>
133 </androidx.coordinatorlayout.widget.CoordinatorLayout>