]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/activity_main.xml
eef1375e453fa1fd16fcae0725bbbbd4a684c325
[mobile-ledger.git] / app / src / main / 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     <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" />
32
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">
38
39         <androidx.constraintlayout.widget.ConstraintLayout
40             android:layout_width="match_parent"
41             android:layout_height="match_parent">
42
43             <androidx.constraintlayout.widget.ConstraintLayout
44                 android:id="@+id/pager_layout"
45                 android:layout_width="match_parent"
46                 android:layout_height="match_parent">
47
48                 <com.google.android.material.floatingactionbutton.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="?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:backgroundTint="?colorAccent"
93                             android:clickable="true"
94                             android:focusable="true" />
95
96                     </LinearLayout>
97
98                     <LinearLayout
99                         android:layout_width="match_parent"
100                         android:layout_height="wrap_content"
101                         android:elevation="24dp"
102                         android:orientation="horizontal">
103
104                         <TextView
105                             android:id="@+id/transaction_last_update_label"
106                             android:layout_width="wrap_content"
107                             android:layout_height="wrap_content"
108                             android:paddingStart="8dp"
109                             android:paddingEnd="8dp"
110                             android:text="@string/transactions_last_update_label"
111                             android:textColor="@android:color/tertiary_text_light" />
112
113                         <TextView
114                             android:id="@+id/transactions_last_update"
115                             style="@android:style/Widget.DeviceDefault.Light.TextView"
116                             android:layout_width="0dp"
117                             android:layout_height="wrap_content"
118                             android:layout_weight="1"
119                             android:text="\?"
120                             android:textColor="@android:color/tertiary_text_light"
121                             tools:ignore="HardcodedText" />
122                     </LinearLayout>
123
124                     <LinearLayout
125                         android:id="@+id/transaction_progress_layout"
126                         android:layout_width="match_parent"
127                         android:layout_height="wrap_content"
128                         android:gravity="center_vertical"
129                         android:orientation="horizontal"
130                         android:visibility="gone">
131
132                         <ProgressBar
133                             android:id="@+id/transaction_list_progress_bar"
134                             style="?android:attr/progressBarStyleHorizontal"
135                             android:layout_width="0dp"
136                             android:layout_height="wrap_content"
137                             android:layout_marginTop="-8dp"
138                             android:layout_marginBottom="-7dp"
139                             android:layout_weight="1"
140                             android:indeterminate="true"
141                             android:padding="0dp"
142                             android:progressTint="?colorPrimary"
143                             app:layout_constraintEnd_toEndOf="parent"
144                             app:layout_constraintStart_toStartOf="parent" />
145
146                         <TextView
147                             android:id="@+id/transaction_list_cancel_download"
148                             android:layout_width="wrap_content"
149                             android:layout_height="wrap_content"
150                             android:background="@drawable/ic_clear_black_24dp"
151                             android:clickable="true"
152                             android:focusable="true"
153                             android:onClick="onStopTransactionRefreshClick" />
154                     </LinearLayout>
155
156                 </LinearLayout>
157
158                 <androidx.viewpager.widget.ViewPager
159                     android:id="@+id/root_frame"
160                     android:layout_width="match_parent"
161                     android:layout_height="0dp"
162                     app:layout_behavior="@string/appbar_scrolling_view_behavior"
163                     app:layout_constraintBottom_toBottomOf="parent"
164                     app:layout_constraintTop_toBottomOf="@+id/main_header">
165
166                 </androidx.viewpager.widget.ViewPager>
167
168                 <View
169                     android:layout_width="0dp"
170                     android:layout_height="4dp"
171                     android:background="@drawable/drop_shadow"
172                     app:layout_constraintEnd_toEndOf="parent"
173                     app:layout_constraintStart_toStartOf="parent"
174                     app:layout_constraintTop_toBottomOf="@id/main_header" />
175
176
177             </androidx.constraintlayout.widget.ConstraintLayout>
178
179             <include layout="@layout/no_profiles" />
180         </androidx.constraintlayout.widget.ConstraintLayout>
181
182         <include layout="@layout/main_navigation" />
183
184     </androidx.drawerlayout.widget.DrawerLayout>
185 </LinearLayout>