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/transactions_last_update_layout"
75 android:layout_width="match_parent"
76 android:layout_height="wrap_content"
77 android:elevation="24dp"
78 android:orientation="horizontal">
81 android:id="@+id/transaction_last_update_label"
82 android:textAppearance="@android:style/TextAppearance.Material.Small"
83 android:layout_width="wrap_content"
84 android:layout_height="wrap_content"
85 android:paddingStart="8dp"
86 android:paddingEnd="8dp"
87 android:text="@string/transactions_last_update_label"
91 android:id="@+id/transactions_last_update"
92 android:textAppearance="@android:style/TextAppearance.Material.Small"
93 android:layout_width="0dp"
94 android:layout_height="wrap_content"
95 android:layout_weight="1"
97 tools:ignore="HardcodedText" />
101 android:id="@+id/transaction_progress_layout"
102 android:layout_width="match_parent"
103 android:layout_height="wrap_content"
104 android:gravity="center_vertical"
105 android:orientation="horizontal"
106 android:visibility="gone">
109 android:id="@+id/transaction_list_progress_bar"
110 style="?android:attr/progressBarStyleHorizontal"
111 android:layout_width="0dp"
112 android:layout_height="wrap_content"
113 android:layout_marginTop="-8dp"
114 android:layout_marginBottom="-7dp"
115 android:layout_weight="1"
116 android:indeterminate="true"
117 android:padding="0dp"
118 android:progressTint="?colorPrimary"
119 app:layout_constraintEnd_toEndOf="parent"
120 app:layout_constraintStart_toStartOf="parent" />
123 android:id="@+id/transaction_list_cancel_download"
124 android:layout_width="wrap_content"
125 android:layout_height="wrap_content"
126 android:background="@drawable/ic_clear_accent_24dp"
127 android:clickable="true"
128 android:focusable="true"
129 android:onClick="onStopTransactionRefreshClick" />
134 <androidx.viewpager.widget.ViewPager
135 android:id="@+id/root_frame"
136 android:layout_width="match_parent"
137 android:layout_height="0dp"
138 app:layout_constraintBottom_toBottomOf="parent"
139 app:layout_constraintEnd_toEndOf="parent"
140 app:layout_constraintStart_toStartOf="parent"
141 app:layout_constraintTop_toBottomOf="@+id/main_header">
143 </androidx.viewpager.widget.ViewPager>
146 android:layout_width="0dp"
147 android:layout_height="4dp"
148 android:background="@drawable/drop_shadow"
149 app:layout_constraintEnd_toEndOf="parent"
150 app:layout_constraintStart_toStartOf="parent"
151 app:layout_constraintTop_toBottomOf="@id/main_header" />
154 </androidx.constraintlayout.widget.ConstraintLayout>
156 <include layout="@layout/main_navigation" />
158 </androidx.drawerlayout.widget.DrawerLayout>
159 </androidx.coordinatorlayout.widget.CoordinatorLayout>