]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/main_app_layout.xml
fixup: progress
[mobile-ledger.git] / app / src / main / res / layout / main_app_layout.xml
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.
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
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">
27
28
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"
40         />
41
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">
47
48         <androidx.constraintlayout.widget.ConstraintLayout
49             android:id="@+id/pager_layout"
50             android:layout_width="match_parent"
51             android:layout_height="match_parent">
52
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"/>
63
64             <LinearLayout
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">
72
73                 <LinearLayout
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">
79
80                     <TextView
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"
88                         />
89
90                     <TextView
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"
96                         android:text="\?"
97                         tools:ignore="HardcodedText" />
98                 </LinearLayout>
99
100                 <LinearLayout
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">
107
108                     <ProgressBar
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:min="0"
119                         android:progressTint="?colorPrimary"
120                         app:layout_constraintEnd_toEndOf="parent"
121                         app:layout_constraintStart_toStartOf="parent" />
122
123                     <TextView
124                         android:id="@+id/transaction_list_cancel_download"
125                         android:layout_width="wrap_content"
126                         android:layout_height="wrap_content"
127                         android:background="@drawable/ic_clear_accent_24dp"
128                         android:clickable="true"
129                         android:focusable="true"
130                         android:onClick="onStopTransactionRefreshClick" />
131                 </LinearLayout>
132
133             </LinearLayout>
134
135             <androidx.viewpager.widget.ViewPager
136                 android:id="@+id/root_frame"
137                 android:layout_width="match_parent"
138                 android:layout_height="0dp"
139                 app:layout_constraintBottom_toBottomOf="parent"
140                 app:layout_constraintEnd_toEndOf="parent"
141                 app:layout_constraintStart_toStartOf="parent"
142                 app:layout_constraintTop_toBottomOf="@+id/main_header">
143
144             </androidx.viewpager.widget.ViewPager>
145
146             <View
147                 android:layout_width="0dp"
148                 android:layout_height="4dp"
149                 android:background="@drawable/drop_shadow"
150                 app:layout_constraintEnd_toEndOf="parent"
151                 app:layout_constraintStart_toStartOf="parent"
152                 app:layout_constraintTop_toBottomOf="@id/main_header" />
153
154
155         </androidx.constraintlayout.widget.ConstraintLayout>
156
157         <include layout="@layout/main_navigation" />
158
159     </androidx.drawerlayout.widget.DrawerLayout>
160 </androidx.coordinatorlayout.widget.CoordinatorLayout>