]> git.ktnx.net Git - mobile-ledger.git/blob - res/layout/activity_main.xml
bump androidx.constraintlayout library version
[mobile-ledger.git] / res / layout / activity_main.xml
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.
8   ~
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.
13   ~
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/>.
16   -->
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">
25
26     <android.support.v7.widget.Toolbar
27         android:id="@+id/toolbar"
28         android:layout_width="match_parent"
29         android:layout_height="?attr/actionBarSize"
30         android:background="@color/colorPrimary"
31         app:popupTheme="@style/AppTheme.PopupOverlay" />
32
33     <android.support.v4.widget.DrawerLayout
34         android:id="@+id/drawer_layout"
35         android:layout_width="match_parent"
36         android:layout_height="match_parent"
37         tools:openDrawer="start">
38
39         <android.support.constraint.ConstraintLayout
40             android:layout_width="match_parent"
41             android:layout_height="match_parent">
42
43             <android.support.constraint.ConstraintLayout
44                 android:id="@+id/pager_layout"
45                 android:layout_width="match_parent"
46                 android:layout_height="match_parent">
47
48                 <android.support.design.widget.FloatingActionButton
49                     android:id="@+id/btn_add_transaction"
50                     android:layout_width="wrap_content"
51                     android:layout_height="wrap_content"
52                     android:layout_gravity="bottom|end"
53                     android:layout_margin="@dimen/fab_margin"
54                     app:backgroundTint="@color/colorAccent"
55                     app:layout_constraintBottom_toBottomOf="parent"
56                     app:layout_constraintEnd_toEndOf="parent"
57                     app:srcCompat="@drawable/svg_thick_plus_white" />
58
59                 <LinearLayout
60                     android:id="@+id/main_header"
61                     android:layout_width="match_parent"
62                     android:layout_height="wrap_content"
63                     android:orientation="vertical"
64                     android:theme="@style/AppTheme"
65                     app:layout_constraintEnd_toEndOf="parent"
66                     app:layout_constraintStart_toStartOf="parent"
67                     app:layout_constraintTop_toTopOf="parent">
68
69                     <LinearLayout
70                         android:id="@+id/transaction_list_account_name_filter"
71                         android:layout_width="match_parent"
72                         android:layout_height="match_parent"
73                         android:orientation="horizontal"
74                         android:visibility="gone">
75
76                         <TextView
77                             android:layout_width="wrap_content"
78                             android:layout_height="wrap_content"
79                             android:background="@drawable/ic_filter_list_black_24dp" />
80
81                         <AutoCompleteTextView
82                             android:id="@+id/transaction_filter_account_name"
83                             android:layout_width="0dp"
84                             android:layout_height="wrap_content"
85                             android:layout_weight="1" />
86
87                         <TextView
88                             android:id="@+id/clearAccountNameFilter"
89                             android:layout_width="wrap_content"
90                             android:layout_height="wrap_content"
91                             android:background="@drawable/ic_clear_black_24dp"
92                             android:clickable="true"
93                             android:focusable="true" />
94
95                     </LinearLayout>
96
97                     <LinearLayout
98                         android:layout_width="match_parent"
99                         android:layout_height="wrap_content"
100                         android:elevation="24dp"
101                         android:orientation="horizontal">
102
103                         <TextView
104                             android:id="@+id/transaction_last_update_label"
105                             android:layout_width="wrap_content"
106                             android:layout_height="wrap_content"
107                             android:paddingStart="8dp"
108                             android:paddingEnd="8dp"
109                             android:text="@string/transactions_last_update_label"
110                             android:textColor="@android:color/tertiary_text_light" />
111
112                         <TextView
113                             android:id="@+id/transactions_last_update"
114                             style="@android:style/Widget.DeviceDefault.Light.TextView"
115                             android:layout_width="0dp"
116                             android:layout_height="wrap_content"
117                             android:layout_weight="1"
118                             android:text="\?"
119                             android:textColor="@android:color/tertiary_text_light"
120                             tools:ignore="HardcodedText" />
121                     </LinearLayout>
122
123                     <LinearLayout
124                         android:id="@+id/transaction_progress_layout"
125                         android:layout_width="match_parent"
126                         android:layout_height="wrap_content"
127                         android:gravity="center_vertical"
128                         android:orientation="horizontal"
129                         android:visibility="gone">
130
131                         <ProgressBar
132                             android:id="@+id/transaction_list_progress_bar"
133                             style="?android:attr/progressBarStyleHorizontal"
134                             android:layout_width="0dp"
135                             android:layout_height="wrap_content"
136                             android:layout_marginTop="-8dp"
137                             android:layout_marginBottom="-7dp"
138                             android:layout_weight="1"
139                             android:indeterminate="true"
140                             android:padding="0dp"
141                             android:progressTint="@color/colorPrimary"
142                             app:layout_constraintEnd_toEndOf="parent"
143                             app:layout_constraintStart_toStartOf="parent" />
144
145                         <TextView
146                             android:id="@+id/transaction_list_cancel_download"
147                             android:layout_width="wrap_content"
148                             android:layout_height="wrap_content"
149                             android:background="@drawable/ic_clear_black_24dp"
150                             android:clickable="true"
151                             android:focusable="true"
152                             android:onClick="onStopTransactionRefreshClick" />
153                     </LinearLayout>
154
155                 </LinearLayout>
156
157                 <android.support.v4.view.ViewPager
158                     android:id="@+id/root_frame"
159                     android:layout_width="match_parent"
160                     android:layout_height="0dp"
161                     app:layout_behavior="@string/appbar_scrolling_view_behavior"
162                     app:layout_constraintBottom_toBottomOf="parent"
163                     app:layout_constraintTop_toBottomOf="@+id/main_header">
164
165                 </android.support.v4.view.ViewPager>
166
167                 <View
168                     android:layout_width="0dp"
169                     android:layout_height="4dp"
170                     android:background="@drawable/drop_shadow"
171                     app:layout_constraintEnd_toEndOf="parent"
172                     app:layout_constraintStart_toStartOf="parent"
173                     app:layout_constraintTop_toBottomOf="@id/main_header" />
174
175
176             </android.support.constraint.ConstraintLayout>
177
178             <include layout="@layout/no_profiles" />
179         </android.support.constraint.ConstraintLayout>
180
181         <android.support.design.widget.NavigationView
182             android:id="@+id/nav_view"
183             android:layout_width="wrap_content"
184             android:layout_height="match_parent"
185             android:layout_gravity="start"
186             android:fitsSystemWindows="true"
187             android:theme="@style/ThemeOverlay.AppCompat.Light">
188
189
190             <android.support.constraint.ConstraintLayout
191                 android:layout_width="match_parent"
192                 android:layout_height="match_parent"
193                 android:layout_marginBottom="0dp"
194                 android:orientation="vertical">
195
196                 <LinearLayout
197                     android:id="@+id/nav_fixed_items"
198                     android:layout_width="match_parent"
199                     android:layout_height="wrap_content"
200                     android:divider="@drawable/list_divider"
201                     android:elevation="2dp"
202                     android:orientation="vertical"
203                     android:showDividers="beginning"
204                     app:layout_constraintBottom_toBottomOf="parent">
205
206                     <TextView
207                         android:id="@+id/nav_profiles"
208                         style="@style/nav_button"
209                         android:layout_width="match_parent"
210                         android:layout_weight="1"
211                         android:drawableStart="@drawable/ic_view_list_black_24dp"
212                         android:onClick="navProfilesClicked"
213                         android:text="@string/profiles" />
214
215                     <TextView
216                         android:id="@+id/textView2"
217                         style="@style/nav_button"
218                         android:layout_weight="1"
219                         android:drawableStart="@drawable/ic_settings_black_24dp"
220                         android:onClick="navSettingsClicked"
221                         android:text="@string/action_settings" />
222
223                 </LinearLayout>
224
225                 <ScrollView
226                     android:layout_width="0dp"
227                     android:layout_height="0dp"
228                     app:layout_constraintBottom_toTopOf="@+id/nav_fixed_items"
229                     app:layout_constraintEnd_toEndOf="parent"
230                     app:layout_constraintLeft_toLeftOf="parent"
231                     app:layout_constraintStart_toStartOf="parent"
232                     app:layout_constraintTop_toTopOf="parent">
233
234                     <LinearLayout
235                         android:id="@+id/nav_upper"
236                         android:layout_width="match_parent"
237                         android:layout_height="wrap_content"
238                         android:orientation="vertical"
239                         app:layout_constraintBottom_toTopOf="@+id/nav_fixed_items"
240                         app:layout_constraintTop_toBottomOf="@+id/nav_header">
241
242                         <LinearLayout
243                             android:id="@+id/nav_header"
244                             android:layout_width="match_parent"
245                             android:layout_height="wrap_content"
246                             android:background="@drawable/side_nav_bar"
247                             android:gravity="center_vertical"
248                             android:orientation="horizontal"
249                             android:padding="@dimen/activity_vertical_margin"
250                             android:theme="@style/ThemeOverlay.AppCompat.Dark"
251                             app:layout_constraintTop_toTopOf="parent">
252
253                             <include layout="@layout/nav_header_logo" />
254
255                             <LinearLayout
256                                 android:layout_width="match_parent"
257                                 android:layout_height="match_parent"
258                                 android:layout_marginStart="@dimen/activity_horizontal_margin"
259                                 android:layout_marginEnd="@dimen/activity_horizontal_margin"
260                                 android:gravity="center_vertical"
261                                 android:orientation="vertical">
262
263                                 <TextView
264                                     android:layout_width="match_parent"
265                                     android:layout_height="wrap_content"
266                                     android:text="@string/app_name"
267                                     android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
268
269                                 <TextView
270                                     android:id="@+id/drawer_version_text"
271                                     android:layout_width="wrap_content"
272                                     android:layout_height="wrap_content"
273                                     android:text="dummy version"
274                                     tools:ignore="HardcodedText" />
275                             </LinearLayout>
276
277                         </LinearLayout>
278
279                         <LinearLayout
280                             android:id="@+id/nav_actions"
281                             android:layout_width="match_parent"
282                             android:layout_height="match_parent"
283                             android:orientation="vertical">
284
285                             <TextView
286                                 android:id="@+id/nav_account_summary"
287                                 style="@style/nav_button"
288                                 android:drawableStart="@drawable/ic_home_black_24dp"
289                                 android:onClick="onAccountSummaryClicked"
290                                 android:text="@string/account_summary_title" />
291
292                             <TextView
293                                 android:id="@+id/nav_latest_transactions"
294                                 style="@style/nav_button"
295                                 android:drawableStart="@drawable/ic_event_note_black_24dp"
296                                 android:onClick="onLatestTransactionsClicked"
297                                 android:text="@string/nav_latest_transactions_title" />
298
299                             <TextView
300                                 android:id="@+id/textView5"
301                                 style="@style/nav_button"
302                                 android:drawableStart="@drawable/ic_assignment_black_24dp"
303                                 android:text="@string/nav_reports_title" />
304
305                         </LinearLayout>
306
307                     </LinearLayout>
308                 </ScrollView>
309
310             </android.support.constraint.ConstraintLayout>
311
312         </android.support.design.widget.NavigationView>
313
314     </android.support.v4.widget.DrawerLayout>
315 </LinearLayout>