1 <?xml version="1.0" encoding="utf-8"?><!--
2 ~ Copyright © 2019 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/>.
17 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
18 xmlns:app="http://schemas.android.com/apk/res-auto"
19 xmlns:tools="http://schemas.android.com/tools"
20 android:layout_width="match_parent"
21 android:layout_height="match_parent"
22 android:orientation="vertical"
23 android:theme="@style/AppTheme.AppBarOverlay"
24 tools:context=".ui.activity.MainActivity">
26 <androidx.appcompat.widget.Toolbar
27 android:id="@+id/toolbar"
28 android:layout_width="match_parent"
29 android:layout_height="?attr/actionBarSize"
30 android:background="?colorPrimary"
31 app:popupTheme="@style/AppTheme.PopupOverlay" />
33 <androidx.drawerlayout.widget.DrawerLayout
34 android:id="@+id/drawer_layout"
35 android:layout_width="match_parent"
36 android:layout_height="match_parent"
37 tools:openDrawer="start">
39 <androidx.constraintlayout.widget.ConstraintLayout
40 android:layout_width="match_parent"
41 android:layout_height="match_parent">
43 <include layout="@layout/loading" />
45 <androidx.constraintlayout.widget.ConstraintLayout
46 android:visibility="gone"
47 android:id="@+id/pager_layout"
48 android:layout_width="match_parent"
49 android:layout_height="match_parent">
51 <com.google.android.material.floatingactionbutton.FloatingActionButton
52 android:id="@+id/btn_add_transaction"
53 android:layout_width="wrap_content"
54 android:layout_height="wrap_content"
55 android:layout_gravity="bottom|end"
56 android:layout_margin="@dimen/fab_margin"
57 app:backgroundTint="?colorAccent"
58 app:layout_constraintBottom_toBottomOf="parent"
59 app:layout_constraintEnd_toEndOf="parent"
60 app:maxImageSize="36dp"
61 app:srcCompat="@drawable/ic_add_white_24dp" />
64 android:id="@+id/main_header"
65 android:layout_width="match_parent"
66 android:layout_height="wrap_content"
67 android:orientation="vertical"
68 app:layout_constraintEnd_toEndOf="parent"
69 app:layout_constraintStart_toStartOf="parent"
70 app:layout_constraintTop_toTopOf="parent">
73 android:id="@+id/transaction_list_account_name_filter"
74 android:layout_width="match_parent"
75 android:layout_height="match_parent"
76 android:orientation="horizontal"
77 android:visibility="gone">
80 android:layout_width="wrap_content"
81 android:layout_height="wrap_content"
82 android:background="@drawable/ic_filter_list_black_24dp" />
85 android:id="@+id/transaction_filter_account_name"
86 android:layout_width="0dp"
87 android:textColor="?textColor"
88 android:layout_height="wrap_content"
89 android:layout_weight="1" />
92 android:id="@+id/clearAccountNameFilter"
93 android:layout_width="wrap_content"
94 android:layout_height="wrap_content"
95 android:background="@drawable/ic_clear_black_24dp"
96 android:backgroundTint="?colorAccent"
97 android:clickable="true"
98 android:focusable="true" />
103 android:id="@+id/transactions_last_update_layout"
104 android:layout_width="match_parent"
105 android:layout_height="wrap_content"
106 android:elevation="24dp"
107 android:orientation="horizontal">
110 android:id="@+id/transaction_last_update_label"
111 android:layout_width="wrap_content"
112 android:layout_height="wrap_content"
113 android:paddingStart="8dp"
114 android:paddingEnd="8dp"
115 android:text="@string/transactions_last_update_label"
116 android:textColor="@android:color/tertiary_text_light" />
119 android:id="@+id/transactions_last_update"
120 style="@android:style/Widget.DeviceDefault.Light.TextView"
121 android:layout_width="0dp"
122 android:layout_height="wrap_content"
123 android:layout_weight="1"
125 android:textColor="@android:color/tertiary_text_light"
126 tools:ignore="HardcodedText" />
130 android:id="@+id/transaction_progress_layout"
131 android:layout_width="match_parent"
132 android:layout_height="wrap_content"
133 android:gravity="center_vertical"
134 android:orientation="horizontal"
135 android:visibility="gone">
138 android:id="@+id/transaction_list_progress_bar"
139 style="?android:attr/progressBarStyleHorizontal"
140 android:layout_width="0dp"
141 android:layout_height="wrap_content"
142 android:layout_marginTop="-8dp"
143 android:layout_marginBottom="-7dp"
144 android:layout_weight="1"
145 android:indeterminate="true"
146 android:padding="0dp"
147 android:progressTint="?colorPrimary"
148 app:layout_constraintEnd_toEndOf="parent"
149 app:layout_constraintStart_toStartOf="parent" />
152 android:id="@+id/transaction_list_cancel_download"
153 android:layout_width="wrap_content"
154 android:layout_height="wrap_content"
155 android:background="@drawable/ic_clear_black_24dp"
156 android:clickable="true"
157 android:focusable="true"
158 android:onClick="onStopTransactionRefreshClick" />
163 <androidx.viewpager.widget.ViewPager
164 android:id="@+id/root_frame"
165 android:layout_width="match_parent"
166 android:layout_height="0dp"
167 app:layout_behavior="@string/appbar_scrolling_view_behavior"
168 app:layout_constraintBottom_toBottomOf="parent"
169 app:layout_constraintTop_toBottomOf="@+id/main_header">
171 </androidx.viewpager.widget.ViewPager>
174 android:layout_width="0dp"
175 android:layout_height="4dp"
176 android:background="@drawable/drop_shadow"
177 app:layout_constraintEnd_toEndOf="parent"
178 app:layout_constraintStart_toStartOf="parent"
179 app:layout_constraintTop_toBottomOf="@id/main_header" />
182 </androidx.constraintlayout.widget.ConstraintLayout>
184 <include layout="@layout/no_profiles" />
185 </androidx.constraintlayout.widget.ConstraintLayout>
187 <include layout="@layout/main_navigation" />
189 </androidx.drawerlayout.widget.DrawerLayout>