]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/main_app_layout.xml
86e918707ad247d628cc18b4c0c3df431038f376
[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:orientation="vertical"
25     android:theme="@style/AppTheme.AppBarOverlay"
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="?colorAccent"
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     <androidx.drawerlayout.widget.DrawerLayout
42         android:id="@+id/drawer_layout"
43         android:layout_width="match_parent"
44         android:layout_height="match_parent"
45         tools:openDrawer="start">
46
47         <androidx.constraintlayout.widget.ConstraintLayout
48             android:id="@+id/pager_layout"
49             android:layout_width="match_parent"
50             android:layout_height="match_parent">
51
52             <androidx.appcompat.widget.Toolbar
53                 android:id="@+id/toolbar"
54                 android:layout_width="match_parent"
55                 android:layout_height="?attr/actionBarSize"
56                 android:background="?colorPrimary"
57                 app:popupTheme="@style/AppTheme.PopupOverlay"
58                 app:layout_constraintTop_toTopOf="parent"
59                 app:layout_constraintStart_toStartOf="parent"
60                 app:layout_constraintEnd_toEndOf="parent"/>
61
62             <LinearLayout
63                 android:id="@+id/main_header"
64                 android:layout_width="match_parent"
65                 android:layout_height="wrap_content"
66                 android:orientation="vertical"
67                 app:layout_constraintEnd_toEndOf="parent"
68                 app:layout_constraintStart_toStartOf="parent"
69                 app:layout_constraintTop_toBottomOf="@id/toolbar">
70
71                 <LinearLayout
72                     android:id="@+id/transactions_last_update_layout"
73                     android:layout_width="match_parent"
74                     android:layout_height="wrap_content"
75                     android:elevation="24dp"
76                     android:orientation="horizontal">
77
78                     <TextView
79                         android:id="@+id/transaction_last_update_label"
80                         android:layout_width="wrap_content"
81                         android:layout_height="wrap_content"
82                         android:paddingStart="8dp"
83                         android:paddingEnd="8dp"
84                         android:text="@string/transactions_last_update_label"
85                         android:textColor="@android:color/tertiary_text_light" />
86
87                     <TextView
88                         android:id="@+id/transactions_last_update"
89                         style="@android:style/Widget.DeviceDefault.Light.TextView"
90                         android:layout_width="0dp"
91                         android:layout_height="wrap_content"
92                         android:layout_weight="1"
93                         android:text="\?"
94                         android:textColor="@android:color/tertiary_text_light"
95                         tools:ignore="HardcodedText" />
96                 </LinearLayout>
97
98                 <LinearLayout
99                     android:id="@+id/transaction_progress_layout"
100                     android:layout_width="match_parent"
101                     android:layout_height="wrap_content"
102                     android:gravity="center_vertical"
103                     android:orientation="horizontal"
104                     android:visibility="gone">
105
106                     <ProgressBar
107                         android:id="@+id/transaction_list_progress_bar"
108                         style="?android:attr/progressBarStyleHorizontal"
109                         android:layout_width="0dp"
110                         android:layout_height="wrap_content"
111                         android:layout_marginTop="-8dp"
112                         android:layout_marginBottom="-7dp"
113                         android:layout_weight="1"
114                         android:indeterminate="true"
115                         android:padding="0dp"
116                         android:progressTint="?colorPrimary"
117                         app:layout_constraintEnd_toEndOf="parent"
118                         app:layout_constraintStart_toStartOf="parent" />
119
120                     <TextView
121                         android:id="@+id/transaction_list_cancel_download"
122                         android:layout_width="wrap_content"
123                         android:layout_height="wrap_content"
124                         android:background="@drawable/ic_clear_accent_24dp"
125                         android:clickable="true"
126                         android:focusable="true"
127                         android:onClick="onStopTransactionRefreshClick" />
128                 </LinearLayout>
129
130             </LinearLayout>
131
132             <androidx.viewpager.widget.ViewPager
133                 android:id="@+id/root_frame"
134                 android:layout_width="match_parent"
135                 android:layout_height="0dp"
136                 app:layout_constraintBottom_toBottomOf="parent"
137                 app:layout_constraintEnd_toEndOf="parent"
138                 app:layout_constraintStart_toStartOf="parent"
139                 app:layout_constraintTop_toBottomOf="@+id/main_header">
140
141             </androidx.viewpager.widget.ViewPager>
142
143             <View
144                 android:layout_width="0dp"
145                 android:layout_height="4dp"
146                 android:background="@drawable/drop_shadow"
147                 app:layout_constraintEnd_toEndOf="parent"
148                 app:layout_constraintStart_toStartOf="parent"
149                 app:layout_constraintTop_toBottomOf="@id/main_header" />
150
151
152         </androidx.constraintlayout.widget.ConstraintLayout>
153
154         <include layout="@layout/main_navigation" />
155
156     </androidx.drawerlayout.widget.DrawerLayout>
157 </androidx.coordinatorlayout.widget.CoordinatorLayout>