diff options
author | jacquarg <guillaume.jacquart@hoodbrains.com> | 2021-10-29 16:44:39 +0200 |
---|---|---|
committer | jacquarg <guillaume.jacquart@hoodbrains.com> | 2021-10-29 18:00:47 +0200 |
commit | 366e4ffa04e8d301794e613b89ed918df0b59517 (patch) | |
tree | e956d7f30128ef6f5bdd2494be288ee1cb41ce20 /app/src/main/res/layout | |
parent | 74fb672978043886e261eb66c47658caf05812bb (diff) |
Update IPScrambling UI
Diffstat (limited to 'app/src/main/res/layout')
3 files changed, 147 insertions, 109 deletions
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> |