diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/ic_ic_chevron_left_24dp.xml | 10 | ||||
-rw-r--r-- | app/src/main/res/drawable/outlined_background.xml | 22 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_internet_activity_policy.xml | 159 | ||||
-rw-r--r-- | app/src/main/res/layout/ipscrambling_item_app_toggle.xml | 40 | ||||
-rw-r--r-- | app/src/main/res/layout/ipscrambling_item_selectmode.xml | 57 | ||||
-rw-r--r-- | app/src/main/res/values/colors.xml | 1 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 23 |
7 files changed, 194 insertions, 118 deletions
diff --git a/app/src/main/res/drawable/ic_ic_chevron_left_24dp.xml b/app/src/main/res/drawable/ic_ic_chevron_left_24dp.xml new file mode 100644 index 0000000..e88ab33 --- /dev/null +++ b/app/src/main/res/drawable/ic_ic_chevron_left_24dp.xml @@ -0,0 +1,10 @@ +<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="M17.885,3.77L16.115,2L6.115,12L16.115,22L17.885,20.23L9.655,12L17.885,3.77Z" + android:fillColor="#000000" + android:fillAlpha="0.87"/> +</vector> diff --git a/app/src/main/res/drawable/outlined_background.xml b/app/src/main/res/drawable/outlined_background.xml new file mode 100644 index 0000000..2040f18 --- /dev/null +++ b/app/src/main/res/drawable/outlined_background.xml @@ -0,0 +1,22 @@ +<?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/>. + --> + + +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <stroke android:width="1dp" android:color="@color/grey_divider" /> + <corners android:radius="4dp" /> +</shape> 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 982b7c4..4f29776 100644 --- a/app/src/main/res/layout/fragment_internet_activity_policy.xml +++ b/app/src/main/res/layout/fragment_internet_activity_policy.xml @@ -24,9 +24,7 @@ android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="vertical" - android:paddingLeft="32dp" - android:paddingRight="32dp" - tools:context=".main.MainActivity" + android:padding="16dp" > <TextView @@ -34,33 +32,8 @@ android:layout_gravity="center_horizontal" android:layout_height="wrap_content" android:layout_width="match_parent" - android:paddingTop="16dp" - android:text="@string/internet_activity_privacy_info" - android:textColor="@color/black" - android:textSize="14sp" - /> - - <TextView - android:fontFamily="sans-serif-medium" - android:gravity="center_vertical" - android:id="@+id/learn_more_internet_activity_privacy_info" - android:layout_height="48dp" - android:layout_width="wrap_content" - android:text="@string/learn_more" - android:textColor="#007fff" - android:textSize="14sp" - /> - - <TextView - android:fontFamily="sans-serif-medium" - android:id="@+id/my_internet_activity_header" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:paddingBottom="8dp" - android:paddingTop="16dp" - android:text="@string/dashboard_internet_activity_privacy_title" - android:textColor="@color/black" - android:textSize="14sp" + android:text="@string/ipscrambling_info" + android:lineSpacingExtra="5sp" /> <RadioGroup @@ -69,114 +42,82 @@ android:layout_width="match_parent" android:orientation="vertical" > - - <foundation.e.privacycentralapp.common.RightRadioButton + <include layout="@layout/ipscrambling_item_selectmode" + android:id="@+id/radio_use_hidden_ip" + android:layout_width="match_parent" + android:layout_height="88dp" + app:title="@{@string/ipscrambling_hide_ip_label}" + app:subtitle="@{@string/ipscrambling_hide_ip_subtitle}" + /> + <include layout="@layout/ipscrambling_item_selectmode" android:id="@+id/radio_use_real_ip" - android:layout_height="wrap_content" - android:layout_width="match_parent" - android:text="@string/use_real_ip" - android:textSize="16sp" - /> - - <TextView - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:text="@string/i_can_be_tracked" - android:textSize="14sp" - /> - - <foundation.e.privacycentralapp.common.RightRadioButton - android:id="@+id/radio_use_hidden_ip" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" android:layout_width="match_parent" - android:text="@string/hidden_ip" - android:textSize="16sp" - /> - - <TextView - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:text="@string/i_am_anonymous" - android:textSize="14sp" + android:layout_height="88dp" + app:title="@{@string/ipscrambling_real_ip_label}" + app:subtitle="@{@string/ipscrambling_real_ip_subtitle}" /> </RadioGroup> - <TextView android:id="@+id/ipscrambling_tor_status" + + <TextView android:id="@+id/tor_disclaimer" android:layout_height="wrap_content" android:layout_width="match_parent" - android:paddingTop="24dp" - android:text="@string/ipscrambling_is_starting" - android:textColor="@color/black" - android:textSize="16sp" - android:visibility="gone" + android:padding="4dp" + android:textSize="12sp" + android:textColor="@color/black_text_2" + android:text="@string/ipscrambling_tor_disclaimer" + /> <ProgressBar - android:id="@+id/ipscrambling_loading" + android:id="@+id/loader" android:layout_width="48dp" android:layout_height="48dp" android:layout_margin="24dp" android:layout_gravity="center" + android:visibility="gone" /> - <LinearLayout - android:id="@+id/ipscrambling_location" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:paddingTop="32dp" - > - <TextView - android:id="@+id/ipscrambling_location_label" - android:layout_height="wrap_content" - android:layout_width="wrap_content" android:text="@string/ipscrambling_location_label" - android:textColor="@color/black" - android:textSize="16sp" - /> - <Spinner android:id="@+id/ipscrambling_select_location" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - /> - </LinearLayout> - <TextView - android:id="@+id/ipscrambling_activated" + android:id="@+id/ipscrambling_location_label" android:layout_height="wrap_content" android:layout_width="match_parent" - android:paddingTop="32dp" - android:text="@string/ipscrambling_all_apps_scrambled" - android:textColor="@color/black" - android:paddingBottom="8dp" - android:textSize="16sp" - android:visibility="gone" + android:layout_marginTop="16dp" + android:text="@string/ipscrambling_location_label" + android:textColor="@color/black_text" + android:textFontWeight="500" + android:textSize="14sp" /> - </LinearLayout> - - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/recycler_view_scrambled" + <FrameLayout + android:id="@+id/select_location_container" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:visibility="gone" - /> + android:layout_height="54dp" + android:background="@drawable/outlined_background" + android:layout_marginTop="16dp" + android:padding="1dp" + > + <Spinner android:id="@+id/ipscrambling_select_location" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + /> + </FrameLayout> <TextView android:id="@+id/ipscrambling_select_apps" android:layout_height="wrap_content" android:layout_width="match_parent" - android:paddingStart="32dp" - android:paddingEnd="32dp" - android:paddingTop="32dp" - android:paddingBottom="8dp" + android:layout_marginTop="32dp" + android:layout_marginBottom="16dp" android:text="@string/ipscrambling_select_app" - android:textColor="@color/black" - android:textSize="16sp" - android:visibility="gone" + android:textColor="@color/black_text" + android:textFontWeight="500" + android:textSize="14sp" /> + </LinearLayout> + <androidx.recyclerview.widget.RecyclerView - android:id="@+id/recycler_view_to_select" + android:id="@+id/apps" android:layout_width="match_parent" android:layout_height="match_parent" - android:visibility="gone" /> </LinearLayout> </androidx.core.widget.NestedScrollView> diff --git a/app/src/main/res/layout/ipscrambling_item_app_toggle.xml b/app/src/main/res/layout/ipscrambling_item_app_toggle.xml new file mode 100644 index 0000000..117b834 --- /dev/null +++ b/app/src/main/res/layout/ipscrambling_item_app_toggle.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.appcompat.widget.LinearLayoutCompat + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/container" + android:layout_height="52dp" + android:layout_width="match_parent" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:gravity="center_vertical" + > + + <ImageView + android:id="@+id/icon" + android:layout_height="32dp" + android:layout_width="32dp" + android:src="@drawable/ic_facebook" + /> + + <TextView + android:id="@+id/title" + android:layout_centerVertical="true" + android:layout_height="wrap_content" + android:layout_width="0dp" + android:layout_weight="1" + android:maxLines="1" + android:ellipsize="end" + android:layout_marginStart="16dp" + android:textSize="14sp" + tools:text="Body sensor" + /> + + <CheckBox + android:id="@+id/toggle" + android:layout_width="wrap_content" + android:layout_height="24dp" + android:layoutDirection="rtl" + android:checked="true" + /> +</androidx.appcompat.widget.LinearLayoutCompat> diff --git a/app/src/main/res/layout/ipscrambling_item_selectmode.xml b/app/src/main/res/layout/ipscrambling_item_selectmode.xml new file mode 100644 index 0000000..4758d56 --- /dev/null +++ b/app/src/main/res/layout/ipscrambling_item_selectmode.xml @@ -0,0 +1,57 @@ +<?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="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="88dp" + > + <foundation.e.privacycentralapp.common.RightRadioButton + android:id="@+id/radiobutton" + android:layout_height="match_parent" + android:layout_width="match_parent" + /> + <TextView + android:id="@+id/title" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@{title}" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toTopOf="@+id/subtitle" + app:layout_constraintVertical_chainStyle="packed" + /> + <TextView + android:id="@+id/subtitle" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@{subtitle}" + android:textSize="14sp" + android:textColor="@color/grey_text" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toBottomOf="@+id/title" + app:layout_constraintBottom_toBottomOf="parent" + /> + </androidx.constraintlayout.widget.ConstraintLayout> +</layout> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 2a16240..5f4bcb4 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -11,6 +11,7 @@ <color name="accent">@lineageos.platform:color/color_default_accent</color> <color name="black_text">#DE000000</color> + <color name="black_text_2">#BD000000</color> <color name="grey_text">#99000000</color> <color name="grey_text_2">#61000000</color> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f6bcf72..35987ea 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -30,8 +30,20 @@ <string name="dashboard_internet_activity_privacy_subtitle_off">Real IP address exposed</string> <string name="dashboard_internet_activity_privacy_subtitle_on">Real IP address hidden</string> + <!-- IpScrambling --> + <string name="ipscrambling_title">My internet activity</string> + <string name="ipscrambling_info">Choose if you want to expose your real IP address or hide when Quick Privacy is enabled.</string> + <string name="ipscrambling_real_ip_label">Use real IP address</string> + <string name="ipscrambling_real_ip_subtitle">I can be tracked by my IP address</string> + <string name="ipscrambling_hide_ip_label">Hide IP address</string> + <string name="ipscrambling_hide_ip_subtitle">I am anonymous on the internet</string> + <string name="ipscrambling_tor_disclaimer"><b>Note:</b> when active, this setting will slow down your Internet connectivity speed (uses Thor network).</string> + <string name="ipscrambling_location_label">Force a country of origin:</string> + <string name="ipscrambling_any_location">Any country</string> + + <string name="ipscrambling_select_app">Apply this setting to all selected apps:</string> + <!-- --> - <string name="internet_activity_privacy">Internet Activity Privacy</string> <string name="quick_protection_info">Quick protection enables these settings when turned on</string> <string name="quick_protection_settings_list"> - All trackers are turned off.\n- Your geolocation will be faked.\n- Your real IP address will be hidden.</string> <string name="learn_more">Learn more</string> @@ -42,19 +54,12 @@ <string name="longitude">Longitude</string> <string name="latitude">Latitude</string> <string name="add_location">Add location</string> - <string name="internet_activity_privacy_info">Choose if you want to expose your real IP address or hide when connected to the internet (uses the tor network).</string> - <string name="use_real_ip">Use real IP address</string> - <string name="i_can_be_tracked">I can be tracked by my IP address</string> - <string name="hidden_ip">Hide IP address</string> - <string name="i_am_anonymous">I am anonymous on the internet</string> <string name="i_am_exposing">I am exposing my real IP address</string> <string name="ipscrambling_all_apps_scrambled">All apps use hidden IP</string> <string name="ipscrambling_only_selected_apps_scrambled">Only the following apps use hidden IP</string> - <string name="ipscrambling_select_app">Select Apps to hide IP</string> + <string name="ipscrambling_is_starting">Tor is starting...</string> <string name="ipscrambling_is_stopping">Tor is stopping...</string> - <string name="ipscrambling_location_label">Hidden IP\'s location</string> - <string name="ipscrambling_any_location">any</string> ipscrambling_any_location <string name="permission_control_info">Manage and control apps requesting various permissions.</string> |