summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/dashboard_item_submenu_button.xml83
-rw-r--r--app/src/main/res/layout/fragment_dashboard.xml472
-rw-r--r--app/src/main/res/layout/fragment_internet_activity_policy.xml2
3 files changed, 269 insertions, 288 deletions
diff --git a/app/src/main/res/layout/dashboard_item_submenu_button.xml b/app/src/main/res/layout/dashboard_item_submenu_button.xml
new file mode 100644
index 0000000..8802bca
--- /dev/null
+++ b/app/src/main/res/layout/dashboard_item_submenu_button.xml
@@ -0,0 +1,83 @@
+<?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:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ >
+ <data>
+ <variable name="icon" type="android.graphics.drawable.Drawable" />
+ <variable name="title" type="String" />
+ <variable name="subTitle" type="String" />
+ </data>
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:id="@+id/container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ android:background="?attr/selectableItemBackground"
+ >
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_height="32dp"
+ android:layout_width="32dp"
+ android:src="@{icon}"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ />
+
+ <ImageView
+ android:id="@+id/chevron"
+ android:layout_height="24dp"
+ android:layout_width="24dp"
+ android:src="@drawable/ic_chevron_right_24dp"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ />
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_height="wrap_content"
+ android:layout_width="0dp"
+ android:text="@{title}"
+ app:layout_constraintLeft_toRightOf="@+id/icon"
+ app:layout_constraintRight_toLeftOf="@+id/chevron"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/subtitle"
+ app:layout_constraintVertical_chainStyle="packed"
+ android:layout_marginStart="24dp"
+ android:textColor="@color/black"
+ android:textSize="16sp"
+ />
+
+ <TextView
+ android:id="@+id/subtitle"
+ android:layout_height="wrap_content"
+ android:layout_width="0dp"
+ app:layout_constraintLeft_toRightOf="@+id/icon"
+ app:layout_constraintRight_toLeftOf="@+id/chevron"
+ app:layout_constraintTop_toBottomOf="@+id/title"
+ app:layout_constraintBottom_toBottomOf="parent"
+ android:layout_marginStart="24dp"
+ android:text="@{subTitle}"
+ android:textColor="@color/grey_text"
+ android:textSize="14sp"
+ />
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+</layout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml
index effd992..077eaf1 100644
--- a/app/src/main/res/layout/fragment_dashboard.xml
+++ b/app/src/main/res/layout/fragment_dashboard.xml
@@ -1,26 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
+<layout>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent"
android:layout_width="match_parent"
>
-
<include layout="@layout/topbar" />
-
- <ProgressBar
- android:id="@+id/loadingSpinner"
- android:indeterminate="true"
- android:layout_gravity="center"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- />
-
<androidx.core.widget.NestedScrollView
android:id="@+id/scrollContainer"
android:layout_height="match_parent"
android:layout_width="match_parent"
- android:visibility="gone"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
>
@@ -30,314 +20,222 @@
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
- tools:context=".main.MainActivity"
>
<TextView
- android:gravity="center"
- android:layout_gravity="center_horizontal"
- android:layout_height="wrap_content"
+ android:id="@+id/state_label"
android:layout_width="match_parent"
- android:paddingBottom="16dp"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- android:paddingTop="16dp"
- android:text="@string/privacy_dashboard_info"
- android:textColor="@color/black"
- android:textSize="14sp"
- />
-
- <ImageView
- android:id="@+id/togglePrivacyCentral"
- android:layout_height="96dp"
- android:layout_marginBottom="16dp"
- android:layout_marginTop="16dp"
- android:layout_width="96dp"
- android:src="@drawable/ic_privacy_toggle"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="24dp"
+ android:layout_marginBottom="4dp"
+ android:text="@string/dashboard_state_label_off"
+ android:textColor="@color/orange_off"
+ android:gravity="center"
/>
-
<TextView
- android:drawableEnd="@drawable/ic_chevron_right_24dp"
- android:fontFamily="sans-serif-medium"
- android:gravity="center"
- android:id="@+id/tap_to_enable_quick_protection"
- android:layout_gravity="center_horizontal"
- android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:paddingBottom="16dp"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- android:paddingTop="16dp"
- android:text="@string/tap_to_enable_quick_protection"
- android:textColor="@color/black"
- android:textSize="14sp"
+ android:layout_height="wrap_content"
+ android:text="@string/dashboard_change_state_explanations"
+ android:gravity="center"
+ android:textSize="12sp"
+ android:textColor="@color/grey_text_2"
/>
<ImageView
- android:layout_height="160dp"
- android:layout_width="match_parent"
- android:src="@drawable/dummy_leakage_analytics"
- />
-
- <TextView
- android:gravity="center"
- android:id="@+id/personal_leakag_info"
- android:layout_gravity="center_horizontal"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:paddingBottom="16dp"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- android:text="@string/personal_leakage_info"
- android:textColor="@color/black"
- android:textSize="12sp"
+ 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:background="#f9f9f9"
- android:layout_height="match_parent"
android:layout_width="match_parent"
- android:orientation="vertical"
- >
-
- <RelativeLayout
- android:id="@+id/am_i_tracked"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:padding="16dp"
+ android:layout_marginBottom="32dp">
+ <LinearLayout
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:paddingBottom="16dp"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- android:paddingTop="16dp"
- >
-
- <ImageView
- android:id="@+id/am_i_tracked_icon"
- android:layout_alignParentStart="true"
- android:layout_centerVertical="true"
- android:layout_height="36dp"
- android:layout_width="36dp"
- android:src="@drawable/ic_tracked"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:gravity="center">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/dashboard_state_trackers_label"
+ android:textSize="12sp"
+ android:textColor="@color/grey_text"
+ android:layout_marginBottom="8dp"
/>
-
- <LinearLayout
+ <TextView
+ android:id="@+id/state_trackers"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_toEndOf="@+id/am_i_tracked_icon"
- android:layout_toStartOf="@+id/am_i_tracked_chevron"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:paddingEnd="32dp"
- android:paddingStart="16dp"
- >
-
- <TextView
- android:fontFamily="sans-serif-medium"
- android:id="@+id/am_i_tracked_title"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:text="@string/am_i_tracked_title"
- android:textColor="@color/black"
- android:textSize="16sp"
- />
-
- <TextView
- android:id="@+id/am_i_tracked_subtitle"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:text="@string/am_i_tracked_subtitle"
- android:textColor="@color/black"
- android:textSize="14sp"
- />
- </LinearLayout>
-
- <ImageView
- android:id="@+id/am_i_tracked_chevron"
- android:layout_alignParentEnd="true"
- android:layout_centerVertical="true"
- android:layout_height="24dp"
- android:layout_width="24dp"
- android:src="@drawable/ic_chevron_right_24dp"
+ android:text="@string/dashboard_state_trackers_off"
+ android:textSize="12sp"
+ android:textColor="@color/black_text"
+ android:textAllCaps="true"
/>
- </RelativeLayout>
-
- <RelativeLayout
- android:id="@+id/apps_permissions"
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:paddingBottom="16dp"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- android:paddingTop="16dp"
- >
-
- <ImageView
- android:id="@+id/apps_permissions_icon"
- android:layout_alignParentStart="true"
- android:layout_centerVertical="true"
- android:layout_height="36dp"
- android:layout_width="36dp"
- android:src="@drawable/ic_apps_permissions"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:gravity="center">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/dashboard_state_geolocation_label"
+ android:textSize="12sp"
+ android:textColor="@color/grey_text"
+ android:layout_marginBottom="8dp"
/>
-
- <LinearLayout
+ <TextView
+ android:id="@+id/state_geolocation"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_toEndOf="@+id/apps_permissions_icon"
- android:layout_toStartOf="@+id/apps_permissions_chevron"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:paddingEnd="32dp"
- android:paddingStart="16dp"
- >
-
- <TextView
- android:fontFamily="sans-serif-medium"
- android:id="@+id/apps_permissions_title"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:text="@string/apps_permissions_title"
- android:textColor="@color/black"
- android:textSize="16sp"
- />
-
- <TextView
- android:id="@+id/apps_permissions_subtitle"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:text="@string/apps_permissions_subtitle"
- android:textColor="@color/black"
- android:textSize="14sp"
- />
- </LinearLayout>
-
- <ImageView
- android:id="@+id/apps_permissions_chevron"
- android:layout_alignParentEnd="true"
- android:layout_centerVertical="true"
- android:layout_height="24dp"
- android:layout_width="24dp"
- android:src="@drawable/ic_chevron_right_24dp"
+ android:text="@string/dashboard_state_geolocation_off"
+ android:textSize="12sp"
+ android:textColor="@color/black_text"
+ android:textAllCaps="true"
/>
- </RelativeLayout>
-
- <RelativeLayout
- android:id="@+id/my_location"
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:paddingBottom="16dp"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- android:paddingTop="16dp"
- >
-
- <ImageView
- android:id="@+id/my_location_icon"
- android:layout_alignParentStart="true"
- android:layout_centerVertical="true"
- android:layout_height="36dp"
- android:layout_width="36dp"
- android:src="@drawable/ic_my_location"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:gravity="center">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/dashboard_state_ipaddress_label"
+ android:textSize="12sp"
+ android:textColor="@color/grey_text"
+ android:layout_marginBottom="8dp"
/>
-
- <LinearLayout
+ <TextView
+ android:id="@+id/state_ip_address"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_toEndOf="@+id/my_location_icon"
- android:layout_toStartOf="@+id/my_location_chevron"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:paddingEnd="32dp"
- android:paddingStart="16dp"
- >
-
- <TextView
- android:fontFamily="sans-serif-medium"
- android:id="@+id/my_location_title"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:text="@string/my_location_title"
- android:textColor="@color/black"
- android:textSize="16sp"
- />
+ android:text="@string/dashboard_state_ipaddress_off"
+ android:textSize="12sp"
+ android:textColor="@color/black_text"
+ android:textAllCaps="true"
+ />
+ </LinearLayout>
+ </LinearLayout>
- <TextView
- android:id="@+id/my_location_subtitle"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:text="@string/my_location_subtitle"
- android:textColor="@color/black"
- android:textSize="14sp"
- />
- </LinearLayout>
- <ImageView
- android:id="@+id/my_location_chevron"
- android:layout_alignParentEnd="true"
- android:layout_centerVertical="true"
- android:layout_height="24dp"
- android:layout_width="24dp"
- android:src="@drawable/ic_chevron_right_24dp"
- />
- </RelativeLayout>
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="16dp">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/dashboard_graph_label"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ />
- <RelativeLayout
- android:id="@+id/internet_activity_privacy"
+ <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"
+ />
+
+<!-- <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"-->
+<!-- />-->
+ <ImageView
+ android:id="@+id/graph"
+ android:layout_height="160dp"
android:layout_width="match_parent"
- android:paddingBottom="16dp"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- android:paddingTop="16dp"
- >
-
- <ImageView
- android:id="@+id/internet_activity_privacy_icon"
- android:layout_alignParentStart="true"
- android:layout_centerVertical="true"
- android:layout_height="36dp"
- android:layout_width="36dp"
- android:src="@drawable/ic_internet_activity"
- />
-
- <LinearLayout
- android:layout_height="wrap_content"
- android:layout_toEndOf="@+id/internet_activity_privacy_icon"
- android:layout_toStartOf="@+id/internet_activity_privacy_chevron"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:paddingEnd="32dp"
- android:paddingStart="16dp"
- >
-
- <TextView
- android:fontFamily="sans-serif-medium"
- android:id="@+id/internet_activity_privacy_title"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:text="@string/internet_activity_privacy_title"
- android:textColor="@color/black"
- android:textSize="16sp"
- />
-
- <TextView
- android:id="@+id/internet_activity_privacy_subtitle"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:text="@string/internet_activity_privacy_subtitle"
- android:textColor="@color/black"
- android:textSize="14sp"
- />
- </LinearLayout>
+ android:src="@drawable/dummy_leakage_analytics"
+ app:layout_constraintTop_toBottomOf="@+id/graph_period"
+ />
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ <include
+ layout="@layout/dashboard_item_submenu_button"
+ android:id="@+id/am_i_tracked"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:icon="@{@drawable/ic_tracked}"
+ app:title="@{@string/dashboard_am_i_tracked_title}"
+ app:subTitle='@{""}'
+ />
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_marginStart="48dp"
+ android:background="@color/grey_divider"
+ />
- <ImageView
- android:id="@+id/internet_activity_privacy_chevron"
- android:layout_alignParentEnd="true"
- android:layout_centerVertical="true"
- android:layout_height="24dp"
- android:layout_width="24dp"
- android:src="@drawable/ic_chevron_right_24dp"
- />
- </RelativeLayout>
+ <include
+ layout="@layout/dashboard_item_submenu_button"
+ android:id="@+id/apps_permissions"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:icon="@{@drawable/ic_apps_permissions}"
+ app:title="@{@string/dashboard_apps_permissions_title}"
+ app:subTitle='@{@string/dashboard_apps_permissions_subtitle}'
+ />
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_marginStart="72dp"
+ android:background="@color/grey_divider"
+ />
- </LinearLayout>
+ <include
+ layout="@layout/dashboard_item_submenu_button"
+ android:id="@+id/my_location"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:icon="@{@drawable/ic_my_location}"
+ app:title="@{@string/dashboard_location_title}"
+ app:subTitle='@{@string/dashboard_location_subtitle_off}'
+ />
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_marginStart="72dp"
+ android:background="@color/grey_divider"
+ />
+ <include
+ layout="@layout/dashboard_item_submenu_button"
+ android:id="@+id/internet_activity_privacy"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:icon="@{@drawable/ic_internet_activity}"
+ app:title="@{@string/dashboard_internet_activity_privacy_title}"
+ app:subTitle='@{@string/dashboard_internet_activity_privacy_subtitle_off}'
+ />
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_marginStart="72dp"
+ android:background="@color/grey_divider"
+ />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
-</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
+</layout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_internet_activity_policy.xml b/app/src/main/res/layout/fragment_internet_activity_policy.xml
index 12094ab..2c7e102 100644
--- a/app/src/main/res/layout/fragment_internet_activity_policy.xml
+++ b/app/src/main/res/layout/fragment_internet_activity_policy.xml
@@ -57,7 +57,7 @@
android:layout_width="wrap_content"
android:paddingBottom="8dp"
android:paddingTop="16dp"
- android:text="@string/internet_activity_privacy_title"
+ android:text="@string/dashboard_internet_activity_privacy_title"
android:textColor="@color/black"
android:textSize="14sp"
/>