summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout/fragment_dashboard.xml
diff options
context:
space:
mode:
authorGuillaume Jacquart <guillaume.jacquart@hoodbrains.com>2022-03-15 08:50:17 +0000
committerGuillaume Jacquart <guillaume.jacquart@hoodbrains.com>2022-03-15 08:50:17 +0000
commit661889373b2943654101bf7fa8a12992ddc6e82d (patch)
treeb05e098552045c818c149d510d64fbb4355718a3 /app/src/main/res/layout/fragment_dashboard.xml
parenta8a5374b16df8334163697c86c47a816c5cc7b15 (diff)
parentfd4b8f04aaf98da778838854c873ec108586451f (diff)
Merge branch 'update_ui_4963' into 'main'
Update main screen UI, #4963 See merge request e/privacy-central/privacycentralapp!27
Diffstat (limited to 'app/src/main/res/layout/fragment_dashboard.xml')
-rw-r--r--app/src/main/res/layout/fragment_dashboard.xml92
1 files changed, 41 insertions, 51 deletions
diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml
index 93c1d36..97751a1 100644
--- a/app/src/main/res/layout/fragment_dashboard.xml
+++ b/app/src/main/res/layout/fragment_dashboard.xml
@@ -21,49 +21,57 @@
android:layout_width="match_parent"
android:orientation="vertical"
>
-
- <TextView
- android:id="@+id/state_label"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="24dp"
- android:layout_marginBottom="4dp"
- android:text="@string/dashboard_state_subtitle_off"
- android:textColor="@color/orange_off"
- android:gravity="center"
- />
- <TextView
- android:id="@+id/state_subtitle"
+ android:orientation="horizontal"
+ android:gravity="center_vertical">
+ <ImageView
+ android:id="@+id/state_icon"
+ android:layout_height="25dp"
+ android:layout_width="24dp"
+ android:layout_margin="16dp"
+ android:src="@drawable/ic_shield_off"
+ android:scaleType="fitCenter"
+ />
+ <TextView
+ android:id="@+id/state_label"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/dashboard_state_title_off"
+ android:textSize="14sp"
+ android:textColor="@color/grey_text"
+ />
+ <Switch
+ android:id="@+id/toggle_privacy_central"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_margin="16dp"
+ />
+ </LinearLayout>
+ <View
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/dashboard_state_title_on"
- android:gravity="center"
- android:textSize="12sp"
- android:textColor="@color/grey_text_2"
+ android:layout_height="1dp"
+ android:background="@color/grey_divider"
/>
- <ImageView
- android:id="@+id/toggle_privacy_central"
- android:layout_height="120dp"
- android:layout_margin="32dp"
- android:layout_width="120dp"
- android:src="@drawable/ic_quick_privacy_off"
- android:scaleType="fitCenter"
- android:background="?attr/selectableItemBackgroundBorderless"
- />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="16dp"
- android:layout_marginBottom="32dp">
+
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="16dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
- android:gravity="center">
+ android:paddingStart="8dp"
+ >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -87,7 +95,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
- android:gravity="center">
+ android:paddingStart="8dp"
+ >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -111,7 +120,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
- android:gravity="center">
+ android:paddingStart="8dp"
+ >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -147,6 +157,7 @@ android:text="@string/dashboard_state_ipaddress_off"
android:paddingBottom="16dp"
>
<TextView
+ android:id="@+id/graph_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dashboard_graph_label"
@@ -155,32 +166,11 @@ android:text="@string/dashboard_state_ipaddress_off"
app:layout_constraintTop_toTopOf="parent"
/>
- <TextView
- android:id="@+id/graph_period"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/dashboard_graph_period"
- android:textSize="14sp"
- android:textColor="@color/grey_text_2"
- app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- android:layout_marginRight="16dp"
- />
-
-<!-- <TextView-->
-<!-- android:id="@+id/graph_total"-->
-<!-- android:layout_width="wrap_content"-->
-<!-- android:layout_height="wrap_content"-->
-<!-- android:text="200 hits"-->
-<!-- app:layout_constraintRight_toRightOf="parent"-->
-<!-- app:layout_constraintTop_toBottomOf="@+id/graph_period"-->
-<!-- />-->
-
<com.github.mikephil.charting.charts.BarChart
android:id="@+id/graph"
android:layout_height="144dp"
android:layout_width="match_parent"
- app:layout_constraintTop_toBottomOf="@+id/graph_period"
+ app:layout_constraintTop_toBottomOf="@+id/graph_title"
android:layout_marginTop="16dp"
/>