1 <?xml version="1.0" encoding="utf-8"?><!--
2 ~ Copyright © 2019 Damyan Ivanov.
3 ~ This file is part of Mobile-Ledger.
4 ~ Mobile-Ledger 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 ~ Mobile-Ledger 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 Mobile-Ledger. 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 <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" />
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">
39 <android.support.constraint.ConstraintLayout
40 android:layout_width="match_parent"
41 android:layout_height="match_parent">
43 <android.support.design.widget.FloatingActionButton
44 android:id="@+id/btn_add_transaction"
45 android:layout_width="wrap_content"
46 android:layout_height="wrap_content"
47 android:layout_gravity="bottom|end"
48 android:layout_margin="@dimen/fab_margin"
49 android:onClick="fab_new_transaction_clicked"
50 app:backgroundTint="@color/colorPrimary"
51 app:layout_constraintBottom_toBottomOf="parent"
52 app:layout_constraintEnd_toEndOf="parent"
53 app:srcCompat="@drawable/svg_thick_plus_white" />
56 android:id="@+id/main_header"
57 android:layout_width="match_parent"
58 android:layout_height="wrap_content"
59 android:orientation="vertical"
60 app:layout_constraintEnd_toEndOf="parent"
61 app:layout_constraintStart_toStartOf="parent"
62 app:layout_constraintTop_toTopOf="parent">
65 android:layout_width="match_parent"
66 android:layout_height="wrap_content"
67 android:elevation="24dp"
68 android:orientation="horizontal">
71 android:id="@+id/transaction_last_update_label"
72 android:layout_width="wrap_content"
73 android:layout_height="wrap_content"
74 android:paddingEnd="8dp"
75 android:text="@string/transactions_last_update_label"
76 android:textColor="@android:color/tertiary_text_light" />
79 android:id="@+id/transactions_last_update"
80 style="@android:style/Widget.DeviceDefault.Light.TextView"
81 android:layout_width="0dp"
82 android:layout_height="wrap_content"
83 android:layout_weight="1"
85 android:textColor="@android:color/tertiary_text_light"
86 tools:ignore="HardcodedText" />
90 android:id="@+id/transaction_progress_layout"
91 android:layout_width="match_parent"
92 android:layout_height="wrap_content"
93 android:gravity="center_vertical"
94 android:orientation="horizontal"
95 android:visibility="gone">
98 android:id="@+id/transaction_list_progress_bar"
99 style="?android:attr/progressBarStyleHorizontal"
100 android:layout_width="0dp"
101 android:layout_height="wrap_content"
102 android:layout_marginTop="-8dp"
103 android:layout_marginBottom="-7dp"
104 android:layout_weight="1"
105 android:indeterminate="true"
106 android:padding="0dp"
107 android:progressTint="@color/colorPrimary"
108 app:layout_constraintEnd_toEndOf="parent"
109 app:layout_constraintStart_toStartOf="parent"
110 app:layout_constraintTop_toBottomOf="@+id/transaction_list_head" />
113 android:id="@+id/transaction_list_cancel_download"
114 android:layout_width="wrap_content"
115 android:layout_height="wrap_content"
116 android:background="@drawable/ic_clear_black_24dp"
117 android:clickable="true"
118 android:focusable="auto"
119 android:onClick="onStopTransactionRefreshClick" />
125 android:id="@+id/root_frame"
126 android:layout_width="match_parent"
127 android:layout_height="0dp"
128 app:layout_constraintBottom_toBottomOf="parent"
129 app:layout_constraintTop_toBottomOf="@+id/main_header">
134 android:layout_width="0dp"
135 android:layout_height="4dp"
136 android:background="@drawable/drop_shadow"
137 app:layout_constraintTop_toBottomOf="@id/main_header" />
139 </android.support.constraint.ConstraintLayout>
142 <android.support.design.widget.NavigationView
143 android:id="@+id/nav_view"
144 android:layout_width="wrap_content"
145 android:layout_height="match_parent"
146 android:layout_gravity="start"
147 android:fitsSystemWindows="true"
148 android:theme="@style/ThemeOverlay.AppCompat.Light">
151 android:layout_width="match_parent"
152 android:layout_height="match_parent"
153 android:scrollbars="vertical"
154 app:layout_constraintBottom_toBottomOf="parent"
155 app:layout_constraintTop_toTopOf="parent">
157 <android.support.constraint.ConstraintLayout
158 android:layout_width="match_parent"
159 android:layout_height="wrap_content"
160 android:layout_marginBottom="0dp"
161 android:orientation="vertical">
164 android:id="@+id/nav_header"
165 android:layout_width="match_parent"
166 android:layout_height="wrap_content"
167 android:background="@drawable/side_nav_bar"
168 android:gravity="bottom"
169 android:orientation="vertical"
170 android:paddingLeft="@dimen/activity_horizontal_margin"
171 android:paddingTop="@dimen/activity_vertical_margin"
172 android:paddingRight="@dimen/activity_horizontal_margin"
173 android:paddingBottom="@dimen/activity_vertical_margin"
174 android:theme="@style/ThemeOverlay.AppCompat.Dark"
175 app:layout_constraintTop_toTopOf="parent">
178 android:id="@+id/imageView"
179 android:layout_width="wrap_content"
180 android:layout_height="wrap_content"
181 android:contentDescription="@string/nav_header_desc"
182 android:paddingTop="@dimen/nav_header_vertical_spacing"
183 app:srcCompat="@mipmap/ic_launcher_round" />
186 android:layout_width="match_parent"
187 android:layout_height="wrap_content"
188 android:paddingTop="@dimen/nav_header_vertical_spacing"
189 android:text="@string/app_name"
190 android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
193 android:id="@+id/drawer_version_text"
194 android:layout_width="wrap_content"
195 android:layout_height="wrap_content"
196 android:text="@string/nav_header_subtitle" />
201 android:id="@+id/nav_actions"
202 android:layout_width="match_parent"
203 android:layout_height="wrap_content"
204 android:orientation="vertical"
205 app:layout_constraintBottom_toTopOf="@+id/nav_fixed_items"
206 app:layout_constraintTop_toBottomOf="@+id/nav_header">
209 android:id="@+id/nav_account_summary"
210 style="@style/nav_button"
211 android:drawableStart="@drawable/ic_home_black_24dp"
212 android:onClick="onAccountSummaryClicked"
213 android:text="@string/account_summary_title" />
216 android:id="@+id/nav_latest_transactions"
217 style="@style/nav_button"
218 android:drawableStart="@drawable/ic_event_note_black_24dp"
219 android:onClick="onLatestTransactionsClicked"
220 android:text="@string/nav_latest_transactions_title" />
223 android:id="@+id/textView5"
224 style="@style/nav_button"
225 android:drawableStart="@drawable/ic_assignment_black_24dp"
226 android:text="@string/nav_reports_title" />
231 android:id="@+id/nav_fixed_items"
232 android:layout_width="match_parent"
233 android:layout_height="wrap_content"
234 android:divider="@drawable/list_divider"
235 android:elevation="2dp"
236 android:orientation="vertical"
237 android:showDividers="beginning"
238 app:layout_constraintBottom_toBottomOf="parent">
241 android:id="@+id/textView2"
242 style="@style/nav_button"
243 android:layout_weight="1"
244 android:drawableStart="@drawable/ic_settings_black_24dp"
245 android:onClick="nav_settings_clicked"
246 android:text="@string/action_settings" />
249 android:id="@+id/nav_exit"
250 style="@style/nav_button"
251 android:layout_weight="1"
252 android:drawableStart="@drawable/ic_exit_to_app_black_24dp"
253 android:onClick="nav_exit_clicked"
254 android:text="@string/nav_exit_title" />
258 </android.support.constraint.ConstraintLayout>
261 </android.support.design.widget.NavigationView>
263 </android.support.v4.widget.DrawerLayout>