diff options
author | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2023-12-05 08:17:01 +0000 |
---|---|---|
committer | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2023-12-05 08:17:01 +0000 |
commit | 2e897cc8af4234abc4e3f5c3448e1fd7b2b8a1bd (patch) | |
tree | 8f72170bee6247db6743521675d0ac0822b2ef65 /app/src/main/res | |
parent | 0db4d25038823369f320e0cd291968e66ed51e0c (diff) |
1203 trackers oriented view
Diffstat (limited to 'app/src/main/res')
17 files changed, 681 insertions, 121 deletions
diff --git a/app/src/main/res/drawable/bg_stroke_rounded_12.xml b/app/src/main/res/drawable/bg_stroke_rounded_12.xml new file mode 100644 index 0000000..d9c839c --- /dev/null +++ b/app/src/main/res/drawable/bg_stroke_rounded_12.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ + ~ 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/>. + --> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <stroke android:width="1dp" android:color="@color/divider" /> + <corners android:radius="12dp" /> +</shape>
\ No newline at end of file diff --git a/app/src/main/res/drawable/ic_shield_alert.xml b/app/src/main/res/drawable/ic_shield_alert.xml new file mode 100644 index 0000000..9c20541 --- /dev/null +++ b/app/src/main/res/drawable/ic_shield_alert.xml @@ -0,0 +1,15 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:pathData="M12,2L4,5V11.09C4,16.14 7.41,20.85 12,22C16.59,20.85 20,16.14 20,11.09V5L12,2ZM18,11.09C18,15.09 15.45,18.79 12,19.92C8.55,18.79 6,15.1 6,11.09V6.39L12,4.14L18,6.39V11.09Z" + android:fillColor="#000000"/> + <path + android:pathData="M13,14H11V16H13V14Z" + android:fillColor="#000000"/> + <path + android:pathData="M13,7H11V12H13V7Z" + android:fillColor="#000000"/> +</vector> diff --git a/app/src/main/res/drawable/pill_shape_tab_bg.xml b/app/src/main/res/drawable/pill_shape_tab_bg.xml new file mode 100644 index 0000000..5ef1de5 --- /dev/null +++ b/app/src/main/res/drawable/pill_shape_tab_bg.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ + ~ 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/>. + --> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <corners android:radius="200dp"/> + <solid android:color="@color/background_overlay" /> +</shape> diff --git a/app/src/main/res/drawable/pill_shape_tab_indicator.xml b/app/src/main/res/drawable/pill_shape_tab_indicator.xml new file mode 100644 index 0000000..344a049 --- /dev/null +++ b/app/src/main/res/drawable/pill_shape_tab_indicator.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ + ~ 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/>. + --> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/pill_shape_tab_selected" android:state_selected="true"/> + <item android:drawable="@android:color/transparent" android:state_selected="false"/> +</selector>
\ No newline at end of file diff --git a/app/src/main/res/drawable/pill_shape_tab_selected.xml b/app/src/main/res/drawable/pill_shape_tab_selected.xml new file mode 100644 index 0000000..520d985 --- /dev/null +++ b/app/src/main/res/drawable/pill_shape_tab_selected.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ + ~ 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/>. + --> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <corners android:radius="200dp"/> + <solid android:color="@color/e_accent" /> +</shape>
\ No newline at end of file diff --git a/app/src/main/res/layout/apptrackers_fragment.xml b/app/src/main/res/layout/apptrackers_fragment.xml index d0a72d5..06b8d3f 100644 --- a/app/src/main/res/layout/apptrackers_fragment.xml +++ b/app/src/main/res/layout/apptrackers_fragment.xml @@ -15,18 +15,15 @@ ~ 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" +<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" - > - - <androidx.coordinatorlayout.widget.CoordinatorLayout - android:background="@color/background" - android:layout_height="match_parent" - android:layout_width="match_parent" - > + android:background="@color/background" + android:layout_height="match_parent" + android:layout_width="match_parent" + > <include layout="@layout/topbar" /> @@ -37,80 +34,137 @@ app:layout_behavior="@string/appbar_scrolling_view_behavior" > - <LinearLayout - android:layout_height="match_parent" - android:layout_width="match_parent" - android:orientation="vertical" - > - <TextView - android:id="@+id/trackers_count_summary" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="16sp" - android:padding="16dp" - /> <LinearLayout + android:layout_height="match_parent" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:padding="16dp" - android:gravity="center_vertical"> + android:orientation="vertical" + android:layout_marginHorizontal="16dp" + android:layout_marginVertical="32dp" + > + <TextView + android:id="@+id/subtitle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="14sp" + android:lineHeight="20sp" + android:textFontWeight="400" + android:textColor="@color/disabled" + android:layout_marginBottom="16dp" + tools:text="Facebook tracking summary" + /> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_marginBottom="16dp" + android:baselineAligned="false"> + <include + android:id="@+id/data_detected_trackers" + layout="@layout/highlight_data_number" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginEnd="16dp" + android:layout_weight="1" + /> + <include + android:id="@+id/data_blocked_trackers" + layout="@layout/highlight_data_number" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + /> + </LinearLayout> + <include + android:id="@+id/data_blocked_leaks" + layout="@layout/highlight_data_number" + android:layout_width="match_parent" + android:layout_height="wrap_content" + /> + <TextView - android:layout_width="0dp" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:text="@string/apptrackers_block_all_toggle" + android:textSize="14sp" + android:lineHeight="24sp" + android:textFontWeight="500" + android:textColor="@color/primary_text" + android:layout_marginTop="16dp" + android:layout_marginBottom="16dp" + android:text="@string/trackerdetails_manage_tracker" /> - <Switch - android:id="@+id/block_all_toggle" + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:paddingVertical="12dp" + android:layout_marginBottom="16dp" + android:gravity="center_vertical"> + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:textSize="14sp" + android:lineHeight="20sp" + android:textFontWeight="400" + android:textColor="@color/primary_text" + android:text="@string/apptrackers_block_all_toggle" + /> + <Switch + android:id="@+id/block_all_toggle" + android:layout_width="wrap_content" + android:layout_height="24dp" + android:checked="true" + /> + </LinearLayout> + + <include + android:id="@+id/disclaimer_block_trackers" + layout="@layout/disclaimer_block_trackers" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp" + /> + <TextView + android:id="@+id/list_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/apptrackers_list_title" + android:layout_marginTop="16dp" + android:layout_marginBottom="16dp" + android:textSize="14sp" + android:lineHeight="24sp" + android:textFontWeight="500" + android:textColor="@color/primary_text" + /> + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/list" + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:layout_marginBottom="16dp" + tools:listitem="@layout/apptrackers_item_tracker_toggle" + /> + <TextView + android:id="@+id/no_trackers_yet" + android:paddingHorizontal="32dp" + android:paddingTop="64dp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center" + tools:text="@string/apptrackers_no_trackers_yet_block_off" + /> + <com.google.android.material.button.MaterialButton + android:id="@+id/btn_reset" + style="@style/Widget.MaterialComponents.Button.OutlinedButton" android:layout_width="wrap_content" - android:layout_height="24dp" - android:checked="true" + android:layout_height="wrap_content" + android:text="@string/apptrackers_reset" + android:textSize="14sp" + android:layout_gravity="center" + android:visibility="gone" + tools:visibility="visible" + android:layout_margin="16dp" /> </LinearLayout> - <View - android:layout_width="match_parent" - android:layout_height="1dp" - android:background="@color/divider" - /> - <TextView - android:id="@+id/trackers_list_title" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/apptrackers_trackers_list_title" - android:padding="16dp" - android:visibility="gone" - /> - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/trackers" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:layout_marginBottom="16dp" - tools:listitem="@layout/apptrackers_item_tracker_toggle" - android:visibility="gone" - /> - <TextView - android:id="@+id/no_trackers_yet" - android:paddingHorizontal="32dp" - android:paddingTop="64dp" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center" - tools:text="@string/apptrackers_no_trackers_yet_block_off" - /> - <com.google.android.material.button.MaterialButton - android:id="@+id/btn_reset" - style="@style/Widget.MaterialComponents.Button.OutlinedButton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/apptrackers_reset" - android:textSize="14sp" - android:layout_gravity="center" - android:visibility="gone" - tools:visibility="visible" - android:layout_margin="16dp" - /> - </LinearLayout> </androidx.core.widget.NestedScrollView> - </androidx.coordinatorlayout.widget.CoordinatorLayout> -</layout>
\ No newline at end of file +</androidx.coordinatorlayout.widget.CoordinatorLayout> diff --git a/app/src/main/res/layout/apptrackers_item_tracker_toggle.xml b/app/src/main/res/layout/apptrackers_item_tracker_toggle.xml index db7086f..753e734 100644 --- a/app/src/main/res/layout/apptrackers_item_tracker_toggle.xml +++ b/app/src/main/res/layout/apptrackers_item_tracker_toggle.xml @@ -1,12 +1,26 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ + ~ 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/>. + --> <androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/container" - android:layout_height="52dp" + android:layout_height="62dp" android:layout_width="match_parent" - android:paddingStart="16dp" - android:paddingEnd="16dp" android:gravity="center_vertical" > <TextView @@ -18,6 +32,8 @@ android:maxLines="1" android:ellipsize="end" android:textSize="14sp" + android:lineHeight="20sp" + android:textFontWeight="400" tools:text="Body sensor" /> <Switch diff --git a/app/src/main/res/layout/disclaimer_block_trackers.xml b/app/src/main/res/layout/disclaimer_block_trackers.xml new file mode 100644 index 0000000..5d58c5f --- /dev/null +++ b/app/src/main/res/layout/disclaimer_block_trackers.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ + ~ 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/>. + --> + +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:drawableStart="@drawable/ic_shield_alert" + android:drawableTint="@color/primary_text" + tools:text="Note: in some rare cases, disabling tracker can cause some apps to malfunction. You can choose specifically which trackers you want to block. Know more." + android:drawablePadding="16dp" + android:paddingHorizontal="16dp" + android:paddingVertical="12dp" + android:textSize="12sp" + android:lineHeight="16sp" + android:textFontWeight="400" + android:background="@drawable/bg_stroke_rounded_12" /> diff --git a/app/src/main/res/layout/fragment_fake_location.xml b/app/src/main/res/layout/fragment_fake_location.xml index 3c709e9..5da95e1 100644 --- a/app/src/main/res/layout/fragment_fake_location.xml +++ b/app/src/main/res/layout/fragment_fake_location.xml @@ -1,4 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ 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> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" @@ -89,7 +106,7 @@ android:id="@+id/map_overlay" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/grey_overlay" + android:background="@color/disabled" android:visibility="visible" /> <ProgressBar diff --git a/app/src/main/res/layout/fragment_trackers.xml b/app/src/main/res/layout/fragment_trackers.xml index 0cd5980..683f01c 100644 --- a/app/src/main/res/layout/fragment_trackers.xml +++ b/app/src/main/res/layout/fragment_trackers.xml @@ -1,4 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ 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> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" @@ -13,14 +30,9 @@ <androidx.core.widget.NestedScrollView android:layout_height="match_parent" android:layout_width="match_parent" + android:fillViewport="true" app:layout_behavior="@string/appbar_scrolling_view_behavior" > - -<LinearLayout - android:layout_height="match_parent" - android:layout_width="match_parent" - android:orientation="vertical" - > <LinearLayout android:layout_height="match_parent" android:layout_width="match_parent" @@ -66,24 +78,37 @@ app:period="@{@string/trackers_period_year}" /> <TextView - android:id="@+id/trackers_apps_list_title" + android:id="@+id/trackers_lists_title" android:layout_height="wrap_content" android:layout_width="match_parent" android:layout_marginTop="32dp" - android:paddingTop="16dp" - android:paddingHorizontal="16dp" - android:text="@string/trackers_applist_title" + android:layout_marginHorizontal="16dp" + android:layout_marginBottom="24dp" + android:textSize="14sp" + android:lineHeight="24dp" + android:textFontWeight="500" + android:text="@string/trackers_lists_title" + /> + <com.google.android.material.tabs.TabLayout + android:id="@+id/lists_tabs" + android:layout_width="match_parent" + android:layout_height="32dp" + android:layout_marginHorizontal="16dp" + android:layout_marginBottom="32dp" + android:background="@drawable/pill_shape_tab_bg" + app:tabBackground="@drawable/pill_shape_tab_indicator" + app:tabIndicator="@null" + app:tabSelectedTextColor="@color/white" + app:tabTextColor="@color/primary_text" + app:textAllCaps="false" /> - </LinearLayout> - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/apps" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="16dp" - android:paddingBottom="32dp" - /> -</LinearLayout> -</androidx.core.widget.NestedScrollView> + <androidx.viewpager2.widget.ViewPager2 + android:id="@+id/lists_pager" + android:layout_width="match_parent" + android:layout_height="match_parent" + /> + </LinearLayout> + </androidx.core.widget.NestedScrollView> </androidx.coordinatorlayout.widget.CoordinatorLayout> -</layout>
\ No newline at end of file +</layout> diff --git a/app/src/main/res/layout/highlight_data_number.xml b/app/src/main/res/layout/highlight_data_number.xml new file mode 100644 index 0000000..7938165 --- /dev/null +++ b/app/src/main/res/layout/highlight_data_number.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ + ~ 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/>. + --> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="12dp" + android:gravity="center_horizontal" + android:background="@drawable/bg_stroke_rounded_12"> + <TextView + android:id="@+id/primary_message" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="14sp" + android:lineHeight="20sp" + android:textFontWeight="400" + android:textColor="@color/primary_text" + android:textAllCaps="true" + tools:text="Detected in" + /> + <TextView + android:id="@+id/number" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginVertical="8dp" + android:textSize="24sp" + android:lineHeight="24sp" + android:textFontWeight="400" + android:textColor="@color/primary_text" + tools:text="5" + /> + <TextView + android:id="@+id/secondary_message" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="12sp" + android:lineHeight="16sp" + android:textFontWeight="400" + android:textColor="@color/disabled" + tools:text="Different applications" + /> +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/trackerdetails_fragment.xml b/app/src/main/res/layout/trackerdetails_fragment.xml new file mode 100644 index 0000000..45ba0e4 --- /dev/null +++ b/app/src/main/res/layout/trackerdetails_fragment.xml @@ -0,0 +1,135 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (C) 2023 MURENA SAS + ~ + ~ 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/>. + --> +<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:background="@color/background" + android:layout_height="match_parent" + android:layout_width="match_parent" + > + + <include layout="@layout/topbar" /> + + <androidx.core.widget.NestedScrollView + android:layout_height="match_parent" + android:layout_width="match_parent" + android:fillViewport="true" + app:layout_behavior="@string/appbar_scrolling_view_behavior" + > + + <LinearLayout + android:layout_height="match_parent" + android:layout_width="match_parent" + android:orientation="vertical" + android:layout_marginHorizontal="16dp" + android:layout_marginVertical="32dp" + > + <TextView + android:id="@+id/subtitle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="14sp" + android:lineHeight="20sp" + android:textFontWeight="400" + android:textColor="@color/disabled" + android:layout_marginBottom="16dp" + tools:text="Doubleclic.net tracking summary" + /> + <include + android:id="@+id/data_app_count" + layout="@layout/highlight_data_number" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp" + /> + + <include + android:id="@+id/data_blocked_leaks" + layout="@layout/highlight_data_number" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp" + /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="14sp" + android:lineHeight="24sp" + android:textFontWeight="500" + android:textColor="@color/primary_text" + android:layout_marginTop="16dp" + android:layout_marginBottom="16dp" + android:text="@string/trackerdetails_manage_tracker" + /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:paddingVertical="12dp" + android:layout_marginBottom="16dp" + android:gravity="center_vertical"> + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:textSize="14sp" + android:lineHeight="20sp" + android:textFontWeight="400" + android:textColor="@color/primary_text" + android:text="@string/trackerdetails_block_all_toggle" + /> + <Switch + android:id="@+id/block_all_toggle" + android:layout_width="wrap_content" + android:layout_height="24dp" + android:checked="true" + /> + </LinearLayout> + + <include + android:id="@+id/disclaimer_block_trackers" + layout="@layout/disclaimer_block_trackers" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp" + /> + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/trackerdetails_apps_list_title" + android:layout_marginTop="16dp" + android:layout_marginBottom="16dp" + android:textSize="14sp" + android:lineHeight="24sp" + android:textFontWeight="500" + android:textColor="@color/primary_text" + /> + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/apps" + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:layout_marginBottom="16dp" + tools:listitem="@layout/apptrackers_item_tracker_toggle" + + /> + </LinearLayout> + </androidx.core.widget.NestedScrollView> +</androidx.coordinatorlayout.widget.CoordinatorLayout> diff --git a/app/src/main/res/layout/trackers_item_app.xml b/app/src/main/res/layout/trackers_item_app.xml index 6af43ea..883a4da 100644 --- a/app/src/main/res/layout/trackers_item_app.xml +++ b/app/src/main/res/layout/trackers_item_app.xml @@ -1,20 +1,36 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ + ~ 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/>. + --> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/container" - android:layout_height="52dp" + android:layout_height="60dp" android:layout_width="match_parent" - android:paddingStart="16dp" - android:paddingEnd="16dp" + android:paddingHorizontal="24dp" + android:paddingVertical="12dp" android:gravity="center_vertical" android:background="?attr/selectableItemBackground" > <ImageView android:id="@+id/icon" - android:layout_height="32dp" - android:layout_width="32dp" + android:layout_height="24dp" + android:layout_width="24dp" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" @@ -24,10 +40,12 @@ android:id="@+id/title" android:layout_height="wrap_content" android:layout_width="0dp" + android:layout_marginStart="16dp" android:maxLines="1" android:ellipsize="end" - android:layout_marginStart="16dp" android:textSize="14sp" + android:lineHeight="20sp" + android:textFontWeight="400" android:textColor="@color/primary_text" tools:text="Body sensor" app:layout_constraintLeft_toRightOf="@+id/icon" @@ -42,20 +60,22 @@ android:layout_width="0dp" android:maxLines="1" android:ellipsize="end" - android:layout_marginStart="16dp" - android:textSize="14sp" - android:textColor="@color/secondary_text" - tools:text="1 tracker blocked out of 4" - app:layout_constraintLeft_toRightOf="@+id/icon" + android:textSize="12sp" + android:lineHeight="16sp" + android:textFontWeight="400" + android:textColor="@color/disabled" + tools:text="5 trackers detected" + app:layout_constraintLeft_toLeftOf="@+id/title" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@+id/title" - app:layout_constraintRight_toLeftOf="@+id/arrow" + app:layout_constraintRight_toRightOf="@+id/title" /> <ImageView android:id="@+id/arrow" android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/ic_chevron_right_24dp" + android:layout_marginStart="16dp" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" diff --git a/app/src/main/res/layout/trackers_list.xml b/app/src/main/res/layout/trackers_list.xml new file mode 100644 index 0000000..3191b91 --- /dev/null +++ b/app/src/main/res/layout/trackers_list.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ 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/>. + --> +<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/list" + android:layout_width="match_parent" + android:layout_height="match_parent" + > +</androidx.recyclerview.widget.RecyclerView> diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml index 52a1677..1047da6 100644 --- a/app/src/main/res/navigation/nav_graph.xml +++ b/app/src/main/res/navigation/nav_graph.xml @@ -61,6 +61,9 @@ android:id="@+id/goto_appTrackersFragment" app:destination="@id/appTrackersFragment" /> + <action + android:id="@+id/goto_trackerDetailsFragment" + app:destination="@id/trackerDetailsFragment" /> </fragment> <fragment android:id="@+id/appTrackersFragment" @@ -74,6 +77,14 @@ /> </fragment> <fragment + android:id="@+id/trackerDetailsFragment" + android:name="foundation.e.advancedprivacy.features.trackers.trackerdetails.TrackerDetailsFragment" + android:label="TrackerDetailsFragment"> + <argument + android:name="trackerId" + app:argType="string" /> + </fragment> + <fragment android:id="@+id/fakeLocationFragment" android:name="foundation.e.advancedprivacy.features.location.FakeLocationFragment" android:label="@string/location_title" diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 952ed60..e0e9530 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,4 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ 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/>. + --> <resources> <!--themable --> <color name="primary">@color/e_action_bar</color> @@ -10,14 +27,16 @@ <color name="background">@color/e_background</color> <color name="iconInvertedColor">@color/e_alpha_base</color> + <color name="disabled">@color/e_disabled_color</color> + <color name="divider">@color/e_divider_color</color> + + <color name="background_overlay">@color/e_background_overlay</color> <!-- Custom --> <color name="dark_color">#263238</color> <color name="white">#FFFFFFFF</color> - <color name="grey_overlay">@color/e_disabled_color</color> <color name="green_valid">#28C97C</color> <color name="red_off">#F8432E</color> <color name="blue_unselected">#AADCFE</color> <!-- used in combination with accent color ! --> - <color name="divider">@color/e_background_overlay</color> <!-- Widget --> <color name="on_surface_high_emphasis">@color/e_primary_text_color_dark</color> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ba3ba03..aa33837 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,4 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 MURENA SAS + ~ 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/>. + --> <resources> <string name="app_name" translatable="false">Advanced Privacy</string> @@ -80,25 +97,55 @@ <string name="trackers_period_day" weblate_ctx="trackers-1">24 hours</string> <string name="trackers_period_month" weblate_ctx="trackers-1;trackers-2">past month</string> <string name="trackers_period_year" weblate_ctx="trackers-1">past year</string> - <string name="trackers_applist_title" weblate_ctx="trackers-3">Manage trackers used in applications * :</string> + <string name="trackers_applist_infos" translatable="false">@string/ipscrambling_app_list_infos</string> + <string name="trackers_lists_title" weblate_ctx="trackers-3">Trackers Activity Summary</string> + <string name="trackers_toggle_list_apps">Apps</string> + <string name="trackers_toggle_list_trackers">Trackers</string> + + <string name="trackers_list_app_trackers_counts">%s trackers detected</string> + <string name="trackers_list_tracker_apps_counts">detected in %s apps</string> + <string name="trackers_graph_hours_period_format">HH:mm</string> <string name="trackers_graph_days_period_format">MMMM d - EEE</string> <string name="trackers_graph_months_period_format">MMMM yyyy</string> - <string name="trackers_app_trackers_counts">%1$d/%2$d blocked trackers, %3$d leaks</string> + <!-- App Trackers --> - <string name="apptrackers_block_all_toggle">Block trackers</string> - <string name="apptrackers_trackers_list_title">Opt for the trackers you want to activate/deactivate.</string> + <string name="apptrackers_subtitle">%s tracking summary</string> + <string name="apptrackers_detected_tracker_primary">Total</string> + <string name="apptrackers_detected_tracker_secondary">Detected trackers</string> + <string name="apptrackers_blocked_tracker_primary">Blocked</string> + <string name="apptrackers_blocked_tracker_secondary">Trackers</string> + <string name="apptrackers_blocked_leaks_primary">Blocked leaks</string> + <string name="apptrackers_blocked_leaks_secondary">%s allowed leaks</string> + <string name="apptrackers_manage_tracker">Manage tracker</string> + <string name="apptrackers_block_all_toggle">Toggle on trackers control</string> + <string name="apptrackers_list_title">Toggle off the trackers you want to allow:</string> <string name="apptrackers_no_trackers_yet_block_off">No trackers were detected yet. If new trackers are detected they will be updated here.</string> <string name="apptrackers_no_trackers_yet_block_on">No trackers were detected yet. All future trackers will be blocked.</string> <string name="app_trackers_no_trackers_yet_remaining_whitelist">No trackers were detected yet. Some trackers were unblocked previously.</string> <string name="apptrackers_error_quickprivacy_disabled">Enable Quick Privacy to be able to activate/deactivate trackers.</string> - <string name="apptrackers_trackers_count_summary">%1$d blocked trackers out of %2$d detected trackers, %3$d blocked leaks and %4$d allowed leaks.</string> <string name="apptrackers_error_no_app">App not installed.</string> <string name="apptrackers_tracker_control_disabled_message">Changes will take effect when tracker blocker is on.</string> <string name="apptrackers_reset">Reset trackers</string> + <!-- Tracker details --> + <string name="trackerdetails_subtitle">%s tracking summary</string> + <string name="trackerdetails_app_count_primary">Detected in</string> + <string name="trackerdetails_app_count_secondary">Different applications</string> + <string name="trackerdetails_blocked_leaks_primary">Blocked leaks</string> + <string name="trackerdetails_blocked_leaks_secondary">%s allowed leaks</string> + <string name="trackerdetails_manage_tracker">Manage tracker</string> + <string name="trackerdetails_block_all_toggle">Block this tracker across all apps</string> + <string name="trackerdetails_apps_list_title">Toggle off the apps for which you want to allow this tracker:</string> + + <!-- Trackers control disclaimer block --> + <string name="trackercontroldisclaimer_start">Note:</string> + <string name="trackercontroldisclaimer_body">in some rare cases, disabling tracker can cause some apps to malfunction. You can choose specifically which trackers you want to block.</string> + <string name="trackercontroldisclaimer_link">Know more.</string> + + <!-- Features warning dialog --> <string name="warningdialog_do_not_show_again" weblate_ctx="home-trackers-alert;widget-trackers-alert;home-location-alert;widget-location-alert;home-ipscrambling-alert;widget-ipscrambling-alert">Do not show again</string> <string name="warningdialog_trackers_title" weblate_ctx="home-trackers-alert;widget-trackers-alert">Trackers control</string> |