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