summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorRomain Hunault <romain.hunault@e.email>2021-05-27 16:29:58 +0000
committerRomain Hunault <romain.hunault@e.email>2021-05-27 16:29:58 +0000
commit97b51f18dcc2f87a9cdd7f482033e30a6282d853 (patch)
treed951b14909c2dc4aab9908edea9da2122550c59d /app/src/main/res
parent7c02e9a048319c10d7396e7ec094c368f27273fd (diff)
parentfafd978342abb8332fcf3ed45cdc3b7d437576ba (diff)
Merge branch 'improvement/ui' into 'master'
Fix title and add back navigation support See merge request e/privacy-central/privacycentralapp!5
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/fragment_dashboard.xml15
-rw-r--r--app/src/main/res/layout/fragment_fake_location.xml31
-rw-r--r--app/src/main/res/layout/fragment_internet_activity_policy.xml15
-rw-r--r--app/src/main/res/layout/fragment_permission_apps.xml14
-rw-r--r--app/src/main/res/layout/fragment_permissions.xml14
-rw-r--r--app/src/main/res/layout/fragment_quick_protection.xml15
-rw-r--r--app/src/main/res/layout/topbar.xml37
-rw-r--r--app/src/main/res/values/strings.xml5
8 files changed, 64 insertions, 82 deletions
diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml
index 663c270..dc79878 100644
--- a/app/src/main/res/layout/fragment_dashboard.xml
+++ b/app/src/main/res/layout/fragment_dashboard.xml
@@ -1,19 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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_width="match_parent"
android:layout_height="match_parent"
>
- <Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_gravity="top|center"
- android:background="@color/white"
- tools:layout_height="56dp"
- />
+ <include layout="@layout/topbar"/>
<ProgressBar
android:id="@+id/loadingSpinner"
@@ -27,8 +20,8 @@
android:id="@+id/scrollContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginTop="?android:attr/actionBarSize"
android:visibility="gone"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"
>
<LinearLayout
@@ -347,4 +340,4 @@
</LinearLayout>
</androidx.core.widget.NestedScrollView>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_fake_location.xml b/app/src/main/res/layout/fragment_fake_location.xml
index 7d32bfa..40324a1 100644
--- a/app/src/main/res/layout/fragment_fake_location.xml
+++ b/app/src/main/res/layout/fragment_fake_location.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@@ -8,26 +8,19 @@
android:layout_width="match_parent"
>
- <Toolbar
- android:background="@color/white"
- android:id="@+id/toolbar"
- android:layout_gravity="top|center"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_width="match_parent"
- tools:layout_height="56dp"
- />
+ <include layout="@layout/topbar"/>
<androidx.core.widget.NestedScrollView
android:layout_height="match_parent"
- android:layout_marginBottom="32dp"
- android:layout_marginTop="?android:attr/actionBarSize"
android:layout_width="match_parent"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"
>
<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
+ android:layout_marginBottom="32dp"
tools:context=".main.MainActivity"
>
@@ -57,20 +50,6 @@
android:textSize="14sp"
/>
- <TextView
- android:fontFamily="sans-serif-medium"
- android:id="@+id/my_location_header"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:paddingBottom="8dp"
- android:paddingTop="16dp"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- android:text="@string/my_location_title"
- android:textColor="@color/black"
- android:textSize="14sp"
- />
-
<RadioGroup
android:id="@+id/location_choices"
android:layout_height="wrap_content"
@@ -152,4 +131,4 @@
</LinearLayout>
</androidx.core.widget.NestedScrollView>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ 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 6a53498..7a5d8b5 100644
--- a/app/src/main/res/layout/fragment_internet_activity_policy.xml
+++ b/app/src/main/res/layout/fragment_internet_activity_policy.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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_width="match_parent"
@@ -7,20 +7,13 @@
android:background="@color/white"
>
- <Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_gravity="top|center"
- android:background="@color/white"
- tools:layout_height="56dp"
- />
+ <include layout="@layout/topbar"/>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginTop="?android:attr/actionBarSize"
android:layout_marginBottom="32dp"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"
>
<LinearLayout
@@ -102,4 +95,4 @@
</RadioGroup>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_permission_apps.xml b/app/src/main/res/layout/fragment_permission_apps.xml
index 2888af0..65f4169 100644
--- a/app/src/main/res/layout/fragment_permission_apps.xml
+++ b/app/src/main/res/layout/fragment_permission_apps.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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_width="match_parent"
@@ -7,20 +7,12 @@
android:background="@color/white"
>
- <Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_gravity="top|center"
- android:background="@color/white"
- tools:layout_height="56dp"
- />
+ <include layout="@layout/topbar"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:layout_marginTop="?android:attr/actionBarSize"
tools:context=".main.MainActivity"
>
@@ -43,4 +35,4 @@
tools:listitem="@layout/item_permission_apps"
android:id="@+id/recylcer_view_permission_apps"/>
</LinearLayout>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_permissions.xml b/app/src/main/res/layout/fragment_permissions.xml
index 9d1e972..a452570 100644
--- a/app/src/main/res/layout/fragment_permissions.xml
+++ b/app/src/main/res/layout/fragment_permissions.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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_width="match_parent"
@@ -7,14 +7,7 @@
android:background="@color/white"
>
- <Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_gravity="top|center"
- android:background="@color/white"
- tools:layout_height="56dp"
- />
+ <include layout="@layout/topbar"/>
<LinearLayout
android:layout_width="match_parent"
@@ -22,7 +15,6 @@
android:orientation="vertical"
android:paddingLeft="32dp"
android:paddingRight="32dp"
- android:layout_marginTop="?android:attr/actionBarSize"
tools:context=".main.MainActivity"
>
@@ -54,4 +46,4 @@
tools:listitem="@layout/item_permission"
android:id="@+id/recylcer_view_permissions"/>
</LinearLayout>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_quick_protection.xml b/app/src/main/res/layout/fragment_quick_protection.xml
index e8233ee..d57a101 100644
--- a/app/src/main/res/layout/fragment_quick_protection.xml
+++ b/app/src/main/res/layout/fragment_quick_protection.xml
@@ -1,26 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
>
- <Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_gravity="top|center"
- android:background="@color/white"
- tools:layout_height="56dp"
- />
-
+ <include layout="@layout/topbar"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:layout_marginTop="?android:attr/actionBarSize"
android:layout_marginBottom="56dp"
tools:context=".main.MainActivity"
>
@@ -65,4 +56,4 @@
android:textSize="14sp"
android:fontFamily="sans-serif-medium"
android:layout_gravity="bottom|right"/>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/topbar.xml b/app/src/main/res/layout/topbar.xml
new file mode 100644
index 0000000..9142d79
--- /dev/null
+++ b/app/src/main/res/layout/topbar.xml
@@ -0,0 +1,37 @@
+<?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/>.
+ -->
+
+<com.google.android.material.appbar.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ app:elevation="0dp"
+ >
+
+ <com.google.android.material.appbar.MaterialToolbar
+ android:background="@color/white"
+ android:id="@+id/toolbar"
+ app:titleCentered="true"
+ android:elevation="0dp"
+ android:layout_height="?android:attr/actionBarSize"
+ android:layout_width="match_parent"
+ tools:layout_height="56dp"
+ />
+</com.google.android.material.appbar.AppBarLayout>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 8fc7c92..fd24223 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -9,6 +9,7 @@
<string name="apps_permissions_subtitle">%1$d apps are requesting %2$d permissions</string>
<string name="my_location_title">My Location</string>
<string name="my_location_subtitle">"%1$d apps are using location permission\nCurrent location mode: "</string>
+ <string name="internet_activity_privacy">Internet Activity Privacy</string>
<string name="internet_activity_privacy_title">My Internet Activity Privacy</string>
<string name="internet_activity_privacy_subtitle">"Current internet activity mode: "</string>
<string name="quick_protection_info">Quick protection enables these settings when turned on</string>
@@ -38,4 +39,8 @@
<string name="user_location_permission_explanation">This app needs location permissions in order to show its functionality.</string>
<string name="user_location_permission_not_granted">You didn\'t grant location permission</string>
<string name="please_enter_valid_lat_long">Please enter valid latitude and longitude value</string>
+ <string name="quick_protection">Quick Protection</string>
+ <string name="privacy_dashboard">Privacy Dashboard</string>
+ <string name="click_to_learn_more">Click to learn more</string>
+ <string name="apps_permissions">\"Apps Permission\"</string>
</resources> \ No newline at end of file