blob: aabc10847e404318b9cde91e78bae0b7a03304ff (
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
|
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2021 E FOUNDATION
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
>
<data>
<variable name="period" type="String" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="16dp"
>
<TextView
android:id="@+id/trackers_count_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="14 trackers"
/>
<TextView
android:id="@+id/graph_period_label"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textColor="@color/secondary_text"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginRight="16dp"
android:text="@{period}"
tools:text="24 hours"
/>
<com.github.mikephil.charting.charts.BarChart
android:id="@+id/graph"
android:layout_height="110dp"
android:layout_width="match_parent"
app:layout_constraintTop_toBottomOf="@+id/graph_period_label"
/>
<View
android:id="@+id/graph_legend_blocked_icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:padding="1dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/graph"
android:layout_marginTop="9dp"
android:layout_marginStart="16dp"
android:background="@drawable/ic_legend_blocked"
/>
<TextView
android:id="@+id/graph_legend_blocked"
android:layout_width="0dp"
android:layout_height="wrap_content"
tools:text="0 Trackers"
android:layout_marginStart="8dp"
android:textSize="12sp"
app:layout_constraintLeft_toRightOf="@+id/graph_legend_blocked_icon"
app:layout_constraintTop_toBottomOf="@+id/graph" app:layout_constraintRight_toLeftOf="@id/graph_legend_allowed_icon"
android:layout_marginTop="8dp"
android:text="@string/graph_legend_blocked"
/>
<View
android:id="@+id/graph_legend_allowed_icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:padding="1dp"
app:layout_constraintLeft_toRightOf="@+id/graph_legend_blocked"
app:layout_constraintTop_toBottomOf="@+id/graph" app:layout_constraintRight_toLeftOf="@id/graph_legend_allowed"
android:layout_marginTop="9dp"
android:layout_marginStart="16dp"
android:background="@drawable/ic_legend_leaked"
/>
<TextView
android:id="@+id/graph_legend_allowed"
android:layout_width="0dp"
android:layout_height="wrap_content"
tools:text="0 Trackers"
android:layout_marginStart="8dp"
android:textSize="12sp"
app:layout_constraintLeft_toRightOf="@+id/graph_legend_allowed_icon"
app:layout_constraintTop_toBottomOf="@+id/graph" app:layout_constraintRight_toRightOf="parent"
android:layout_marginTop="8dp"
android:layout_marginRight="16dp"
android:text="@string/graph_legend_allowed"
/>
<TextView
android:id="@+id/graph_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="12sp"
android:textColor="@color/secondary_text"
android:layout_marginHorizontal="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:text="@string/graph_empty_message"
android:gravity="center"
android:visibility="gone"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
|