blob: c29e4b0570f98012714c88d8dc617e27264bb555 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
|
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools">
<!-- Main content -->
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/reportsMapContainer"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/margin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:visibility="gone"/>
<ScrollView
android:id="@+id/eventsScroll"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/bottom_sheet_peak"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TableLayout
android:id="@+id/eventsTable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:isScrollContainer="true"
android:scrollbars="vertical"
android:stretchColumns="*">
<TableRow android:background="@color/colorPrimary">
<TextView
android:paddingHorizontal="@dimen/padding"
android:text="@string/table_datetime"
android:textColor="@color/background"
android:padding="@dimen/padding" />
<TextView
android:paddingHorizontal="@dimen/padding"
android:text="@string/table_event"
android:textColor="@color/background"
android:padding="@dimen/padding" />
<TextView
android:paddingHorizontal="@dimen/padding"
android:text="@string/table_geofence"
android:textColor="@color/background"
android:padding="@dimen/padding" />
<TextView
android:paddingHorizontal="@dimen/padding"
android:text="@string/table_address"
android:textColor="@color/background"
android:padding="@dimen/padding" />
</TableRow>
</TableLayout>
</HorizontalScrollView>
</ScrollView>
<include
android:id="@+id/reportLoading"
android:layout_width="0dp"
android:layout_height="0dp"
layout="@layout/loading_indicator"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:visibility="gone"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- Bottom sheet -->
<com.google.android.material.card.MaterialCardView
android:id="@+id/bottomSheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentPadding="@dimen/card_padding"
android:orientation="vertical"
app:behavior_hideable="false"
app:behavior_peekHeight="@dimen/bottom_sheet_peak"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
style="@style/BottomSheetCardStyle">
<LinearLayout
android:id="@+id/periodSection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin"
android:orientation="horizontal">
<!-- Report type -->
<com.addisonelliott.segmentedbutton.SegmentedButtonGroup
android:id="@+id/reportType"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/fields_spacing"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/toggleSheet"
app:borderWidth="1dp"
app:dividerPadding="10dp"
app:dividerWidth="1dp"
app:position="0"
app:radius="30dp"
app:ripple="true"
app:selectedBackground="@color/colorPrimary">
<com.addisonelliott.segmentedbutton.SegmentedButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="10dp"
app:drawableGravity="top"
app:selectedTextColor="@color/darkBackground"
app:text="@string/positions"
app:textColor="@color/colorPrimaryDark" />
<com.addisonelliott.segmentedbutton.SegmentedButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="10dp"
app:drawableGravity="top"
app:selectedTextColor="@color/darkBackground"
app:text="@string/events"
app:textColor="@color/colorPrimaryDark" />
<com.addisonelliott.segmentedbutton.SegmentedButton
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="10dp"
app:drawableGravity="top"
app:selectedTextColor="@color/darkBackground"
app:text="@string/stops"
app:textColor="@color/colorPrimaryDark" />
</com.addisonelliott.segmentedbutton.SegmentedButtonGroup>
<ImageButton
android:id="@+id/toggleSheet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_down"
android:contentDescription="@string/shared_slide_down"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:background="?selectableItemBackgroundBorderless" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- Report period -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/period"
android:textColor="@color/colorPrimaryDark"
android:textSize="22sp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/periodButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/select_period"
android:textColor="@color/colorPrimaryDark"
app:backgroundTint="@color/darkBackground"
style="@style/Widget.AppCompat.Button.Small" />
</LinearLayout>
<!-- Custom period ranges -->
<LinearLayout
android:id="@+id/rangeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:weightSum="2"
android:orientation="horizontal">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/fromInputLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/fields_spacing"
android:hint="@string/period_from"
android:layout_weight="1">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/fromEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/datetime_field"
android:inputType="none"
android:clickable="false"
android:focusable="false"
tools:text="2022-04-11 00:00"
/>
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/period_separator" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/toInputLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/period_to"
android:layout_marginStart="@dimen/fields_spacing"
android:layout_weight="1">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/toEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/datetime_field"
android:inputType="none"
android:clickable="false"
android:focusable="false"
tools:text="2022-04-11 00:39"
/>
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<!-- Action buttons -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/margin">
<com.google.android.material.button.MaterialButton
android:id="@+id/exportButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/export_report"
android:layout_weight="1"
android:layout_marginEnd="@dimen/fields_spacing"
style="?android:buttonStyleSmall"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/shareButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/share_report"
style="?android:buttonStyleSmall"/>
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|