From 1e9202c3d929083220924f7c76ea01a2b6f6af9f Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 22 Jul 2021 15:31:08 +0200 Subject: first implementation of the gateway button, started to remove labels from EipFragment, implement method to get the avearage load of a location as an enum value --- .../res/drawable/cust_button_primary_hard_rect.xml | 21 ++++++++++ .../main/res/drawable/cust_button_primary_rect.xml | 3 -- app/src/main/res/layout-xlarge/f_eip.xml | 46 ++++---------------- app/src/main/res/layout/f_eip.xml | 46 +++----------------- app/src/main/res/layout/v_location_button.xml | 38 +++++++++++++++++ .../res/layout/v_location_status_indicator.xml | 49 ++++++++++++++++++++++ app/src/main/res/values/strings.xml | 4 +- 7 files changed, 123 insertions(+), 84 deletions(-) create mode 100644 app/src/main/res/drawable/cust_button_primary_hard_rect.xml create mode 100644 app/src/main/res/layout/v_location_button.xml create mode 100644 app/src/main/res/layout/v_location_status_indicator.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/drawable/cust_button_primary_hard_rect.xml b/app/src/main/res/drawable/cust_button_primary_hard_rect.xml new file mode 100644 index 00000000..93be5c18 --- /dev/null +++ b/app/src/main/res/drawable/cust_button_primary_hard_rect.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/cust_button_primary_rect.xml b/app/src/main/res/drawable/cust_button_primary_rect.xml index c83d4e62..93be5c18 100644 --- a/app/src/main/res/drawable/cust_button_primary_rect.xml +++ b/app/src/main/res/drawable/cust_button_primary_rect.xml @@ -2,21 +2,18 @@ - - - diff --git a/app/src/main/res/layout-xlarge/f_eip.xml b/app/src/main/res/layout-xlarge/f_eip.xml index d4a51b8d..bef2d635 100644 --- a/app/src/main/res/layout-xlarge/f_eip.xml +++ b/app/src/main/res/layout-xlarge/f_eip.xml @@ -80,53 +80,21 @@ app:layout_constraintTop_toTopOf="@+id/guideline_horizontal_top" app:layout_constraintDimensionRatio="1:1" /> - - - - - + tools:text="SEATTLE" + android:gravity="center_vertical" /> diff --git a/app/src/main/res/layout/f_eip.xml b/app/src/main/res/layout/f_eip.xml index 3309eb5d..8dc1e33b 100644 --- a/app/src/main/res/layout/f_eip.xml +++ b/app/src/main/res/layout/f_eip.xml @@ -82,54 +82,20 @@ app:layout_constraintDimensionRatio="1:1" /> - - - - - + tools:text="SEATTLE" + android:gravity="center_vertical" /> diff --git a/app/src/main/res/layout/v_location_button.xml b/app/src/main/res/layout/v_location_button.xml new file mode 100644 index 00000000..7425231e --- /dev/null +++ b/app/src/main/res/layout/v_location_button.xml @@ -0,0 +1,38 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/v_location_status_indicator.xml b/app/src/main/res/layout/v_location_status_indicator.xml new file mode 100644 index 00000000..97b55917 --- /dev/null +++ b/app/src/main/res/layout/v_location_status_indicator.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 22696c12..b6bdafa8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -155,7 +155,8 @@ Location with best connection Automatic Your traffic is currently routed through: - + Finding best connection… + Reconnecting… Starting bridges for censorship circumvention… Stopping bridges. Using bridges for censorship circumvention. @@ -181,5 +182,4 @@ Hide connection details %s has no internet connection. Please check your WiFi and cellular data settings. - -- cgit v1.2.3 From ff427f2863dd2c3c46030968f4d034553f09d0bf Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 23 Jul 2021 23:50:02 +0200 Subject: add click listener to gateway selection button, open the gateway selection fragment --- app/src/main/res/layout/v_location_button.xml | 2 -- 1 file changed, 2 deletions(-) (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout/v_location_button.xml b/app/src/main/res/layout/v_location_button.xml index 7425231e..9e5445a4 100644 --- a/app/src/main/res/layout/v_location_button.xml +++ b/app/src/main/res/layout/v_location_button.xml @@ -4,8 +4,6 @@ android:orientation="horizontal" android:layout_width="match_parent" android:layout_gravity="center_vertical" - android:clickable="true" - android:focusable="true" android:padding="@dimen/stdpadding" android:background="@drawable/cust_button_primary_rect" android:layout_height="wrap_content"> -- cgit v1.2.3 From 05934715fec39cb22937e82acecd4add4fccd724 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 29 Jul 2021 18:23:55 +0200 Subject: implement location load indicator in gateway selection cell --- app/src/main/res/layout/v_select_text_list_item.xml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout/v_select_text_list_item.xml b/app/src/main/res/layout/v_select_text_list_item.xml index 07187016..36075424 100644 --- a/app/src/main/res/layout/v_select_text_list_item.xml +++ b/app/src/main/res/layout/v_select_text_list_item.xml @@ -19,20 +19,13 @@ tools:visibility="visible" /> - Date: Fri, 30 Jul 2021 15:46:40 +0200 Subject: draft gateway selection UI according to simlpy secure's proposals --- app/src/main/res/layout/f_drawer_main.xml | 2 +- app/src/main/res/layout/f_gateway_selection.xml | 34 +++++++--------------- .../main/res/layout/v_select_text_list_item.xml | 16 ++-------- app/src/main/res/values/strings.xml | 7 +++-- 4 files changed, 18 insertions(+), 41 deletions(-) (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout/f_drawer_main.xml b/app/src/main/res/layout/f_drawer_main.xml index 1f1df7f2..95e6169b 100644 --- a/app/src/main/res/layout/f_drawer_main.xml +++ b/app/src/main/res/layout/f_drawer_main.xml @@ -101,7 +101,7 @@ + + android:text="@string/gateway_selection_automatic_location" /> - - - - + + android:text="@string/gateway_selection_recommended_location" + /> diff --git a/app/src/main/res/layout/v_select_text_list_item.xml b/app/src/main/res/layout/v_select_text_list_item.xml index 36075424..1d7054a4 100644 --- a/app/src/main/res/layout/v_select_text_list_item.xml +++ b/app/src/main/res/layout/v_select_text_list_item.xml @@ -6,25 +6,13 @@ xmlns:tools="http://schemas.android.com/tools"> - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b6bdafa8..7c0c46f0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -152,9 +152,12 @@ No permissions to install app. Select location %s will find the best connection for you. - Location with best connection + Use recommended location Automatic - Your traffic is currently routed through: + Your traffic is currently routed through: + Your traffic will be routed through: + Your traffic is automatically routed through the best location: + Your traffic will be automatically routed through the best location. Finding best connection… Reconnecting… Starting bridges for censorship circumvention… -- cgit v1.2.3 From d366b98aafdb0b211ed7b3870354477ffc250462 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 30 Jul 2021 18:22:12 +0200 Subject: show bridges icon in gateway selector for locations supporting them --- app/src/main/res/layout/v_select_text_list_item.xml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout/v_select_text_list_item.xml b/app/src/main/res/layout/v_select_text_list_item.xml index 1d7054a4..373de14f 100644 --- a/app/src/main/res/layout/v_select_text_list_item.xml +++ b/app/src/main/res/layout/v_select_text_list_item.xml @@ -16,14 +16,25 @@ tools:visibility="visible" /> + + Date: Fri, 30 Jul 2021 20:38:23 +0200 Subject: ask user to change location or disable bridges if manually selected location doesn't support bridges --- app/src/main/res/values/untranslatable.xml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/src/main/res') diff --git a/app/src/main/res/values/untranslatable.xml b/app/src/main/res/values/untranslatable.xml index a08857c1..a288d9a5 100644 --- a/app/src/main/res/values/untranslatable.xml +++ b/app/src/main/res/values/untranslatable.xml @@ -47,6 +47,9 @@ %1$s could not connect to %2$s. Do you want to try to connect automatically with best location? Try best location + %1$s doesn\'t support bridges to circumvent VPN filtering. Do you want to choose a different location or disable bridges? + Disable bridges + Choose different location \ No newline at end of file -- cgit v1.2.3 From 6d3c122bebf0ad4f7dc22d4963dc73dea4248251 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 31 Jul 2021 16:34:09 +0200 Subject: adapt EIP main screen and strings to simply secure proposals --- app/src/main/res/layout-port/f_eip.xml | 108 +++++++++++++++++++++++ app/src/main/res/layout-xlarge-port/f_eip.xml | 119 ++++++++++++++++++++++++++ app/src/main/res/layout-xlarge/f_eip.xml | 61 +++++++++---- app/src/main/res/layout/f_eip.xml | 103 +++++++++++++++------- app/src/main/res/layout/v_location_button.xml | 3 +- app/src/main/res/values/untranslatable.xml | 8 +- 6 files changed, 349 insertions(+), 53 deletions(-) create mode 100644 app/src/main/res/layout-port/f_eip.xml create mode 100644 app/src/main/res/layout-xlarge-port/f_eip.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout-port/f_eip.xml b/app/src/main/res/layout-port/f_eip.xml new file mode 100644 index 00000000..4dae126c --- /dev/null +++ b/app/src/main/res/layout-port/f_eip.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout-xlarge-port/f_eip.xml b/app/src/main/res/layout-xlarge-port/f_eip.xml new file mode 100644 index 00000000..5325d6a6 --- /dev/null +++ b/app/src/main/res/layout-xlarge-port/f_eip.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout-xlarge/f_eip.xml b/app/src/main/res/layout-xlarge/f_eip.xml index bef2d635..8ed9a57c 100644 --- a/app/src/main/res/layout-xlarge/f_eip.xml +++ b/app/src/main/res/layout-xlarge/f_eip.xml @@ -1,4 +1,8 @@ + @@ -34,7 +38,7 @@ android:orientation="horizontal" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toRightOf="parent" - app:layout_constraintGuide_percent="0.7" + app:layout_constraintGuide_percent="0.66" /> - - + + + + + app:layout_constraintGuide_percent="0.1" + app:layout_constraintRight_toRightOf="parent" /> + app:layout_constraintGuide_percent="0.3" /> + + + + + app:layout_constraintGuide_percent="0.7" /> - - - + + + + diff --git a/app/src/main/res/layout/v_location_button.xml b/app/src/main/res/layout/v_location_button.xml index 9e5445a4..d8eed9a3 100644 --- a/app/src/main/res/layout/v_location_button.xml +++ b/app/src/main/res/layout/v_location_button.xml @@ -6,11 +6,10 @@ android:layout_gravity="center_vertical" android:padding="@dimen/stdpadding" android:background="@drawable/cust_button_primary_rect" - android:layout_height="wrap_content"> + android:layout_height="match_parent"> %1$s doesn\'t support bridges to circumvent VPN filtering. Do you want to choose a different location or disable bridges? Disable bridges Choose different location - + Connection Insecure + You are connected to the recommended location + You are connected to + Connecting... + You may be leaking information to your internet provider or local network. + You have no working Internet connection. Once you get it back, you will be automatically connected to + %1$s is blocking all internet traffic. \ No newline at end of file -- cgit v1.2.3 From 033ac24155bf9b56fbf8a247ab582ecd2b934e9a Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 31 Jul 2021 18:32:01 +0200 Subject: initial implementation of classic on-off push button --- app/src/main/res/drawable/ic_btn_on_connecting.xml | 22 ++++++++++++++++++++++ app/src/main/res/drawable/ic_btn_on_disabled.xml | 20 ++++++++++++++++++++ .../main/res/drawable/ic_btn_on_primary_color.xml | 22 ++++++++++++++++++++++ app/src/main/res/layout/v_main_button.xml | 14 +++++++++----- 4 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 app/src/main/res/drawable/ic_btn_on_connecting.xml create mode 100644 app/src/main/res/drawable/ic_btn_on_disabled.xml create mode 100644 app/src/main/res/drawable/ic_btn_on_primary_color.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/drawable/ic_btn_on_connecting.xml b/app/src/main/res/drawable/ic_btn_on_connecting.xml new file mode 100644 index 00000000..4b3d1384 --- /dev/null +++ b/app/src/main/res/drawable/ic_btn_on_connecting.xml @@ -0,0 +1,22 @@ + + + + diff --git a/app/src/main/res/drawable/ic_btn_on_disabled.xml b/app/src/main/res/drawable/ic_btn_on_disabled.xml new file mode 100644 index 00000000..9c83422d --- /dev/null +++ b/app/src/main/res/drawable/ic_btn_on_disabled.xml @@ -0,0 +1,20 @@ + + + + diff --git a/app/src/main/res/drawable/ic_btn_on_primary_color.xml b/app/src/main/res/drawable/ic_btn_on_primary_color.xml new file mode 100644 index 00000000..9f449299 --- /dev/null +++ b/app/src/main/res/drawable/ic_btn_on_primary_color.xml @@ -0,0 +1,22 @@ + + + + diff --git a/app/src/main/res/layout/v_main_button.xml b/app/src/main/res/layout/v_main_button.xml index d8ae211c..741fc88f 100644 --- a/app/src/main/res/layout/v_main_button.xml +++ b/app/src/main/res/layout/v_main_button.xml @@ -102,6 +102,7 @@ app:layout_constraintEnd_toEndOf="@id/border_guideline_right" app:layout_constraintStart_toStartOf="@id/border_guideline_left" app:layout_constraintTop_toTopOf="@id/border_guideline_top" + app:layout_constraintDimensionRatio="1:1" android:indeterminate="true" android:indeterminateDuration="800" android:indeterminateDrawable="@drawable/progressbar_circle" @@ -117,16 +118,19 @@ app:layout_constraintEnd_toStartOf="@+id/vpn_btn_guideline_right" app:layout_constraintStart_toStartOf="@+id/vpn_btn_guideline_left" app:layout_constraintTop_toTopOf="@+id/vpn_btn_guideline_top" + app:layout_constraintDimensionRatio="1:1" app:srcCompat="@drawable/black_circle" /> + app:layout_constraintBottom_toTopOf="@+id/icn_guideline_bottom" + app:layout_constraintEnd_toStartOf="@+id/icn_guideline_right" + app:layout_constraintStart_toStartOf="@+id/icn_guideline_left" + app:layout_constraintTop_toTopOf="@+id/icn_guideline_top" + app:layout_constraintDimensionRatio="1:1" + app:layout_constraintVertical_bias="0.35" + app:srcCompat="@drawable/ic_btn_on_disabled" /> \ No newline at end of file -- cgit v1.2.3 From 41cb3b4adb137b9a1e0affea42e7f4e9cfa1d7dd Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 31 Jul 2021 18:45:00 +0200 Subject: remove some padding in gateway selection fragment --- app/src/main/res/layout/f_gateway_selection.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout/f_gateway_selection.xml b/app/src/main/res/layout/f_gateway_selection.xml index 5a384163..70a2bb1d 100644 --- a/app/src/main/res/layout/f_gateway_selection.xml +++ b/app/src/main/res/layout/f_gateway_selection.xml @@ -35,7 +35,6 @@ android:layout_height="wrap_content" android:gravity="center" android:textAppearance="?android:attr/textAppearanceLarge" - android:paddingTop="@dimen/activity_vertical_margin" android:paddingStart="@dimen/activity_horizontal_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingEnd="@dimen/activity_horizontal_margin" -- cgit v1.2.3 From a2067cd5b56387405cb653de8940e7afc448449d Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 31 Jul 2021 19:30:54 +0200 Subject: Add BuildConfig to disable color filtering of the main screen background, if VPN is turned off. Make EipFragment's text colors customizable --- app/src/main/res/layout-port/f_eip.xml | 2 ++ app/src/main/res/layout-xlarge-port/f_eip.xml | 2 ++ app/src/main/res/layout-xlarge/f_eip.xml | 2 ++ app/src/main/res/layout/f_eip.xml | 3 ++- app/src/main/res/values/colors.xml | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout-port/f_eip.xml b/app/src/main/res/layout-port/f_eip.xml index 4dae126c..03401d16 100644 --- a/app/src/main/res/layout-port/f_eip.xml +++ b/app/src/main/res/layout-port/f_eip.xml @@ -65,6 +65,7 @@ android:padding="@dimen/activity_margin" android:textAppearance="@android:style/TextAppearance.Large" android:textStyle="bold" + android:textColor="@color/colorEipFragmentFont" app:layout_constraintDimensionRatio="1:1" tools:text="CONNETION" android:gravity="center" @@ -82,6 +83,7 @@ android:padding="@dimen/activity_margin" android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" android:textStyle="bold" + android:textColor="@color/colorEipFragmentFont" app:layout_constraintDimensionRatio="1:1" tools:text="A LONG TEXT WITH SEVERAL THINGS BLABLkk \n kdjfkj \n kjdfkjdf" android:gravity="center" diff --git a/app/src/main/res/layout-xlarge-port/f_eip.xml b/app/src/main/res/layout-xlarge-port/f_eip.xml index 5325d6a6..6a115a8b 100644 --- a/app/src/main/res/layout-xlarge-port/f_eip.xml +++ b/app/src/main/res/layout-xlarge-port/f_eip.xml @@ -76,6 +76,7 @@ android:padding="@dimen/activity_margin" android:textAppearance="@android:style/TextAppearance.Large" android:textStyle="bold" + android:textColor="@color/colorEipFragmentFont" app:layout_constraintDimensionRatio="1:1" tools:text="CONNETION" android:gravity="center" @@ -93,6 +94,7 @@ android:padding="@dimen/activity_margin" android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" android:textStyle="bold" + android:textColor="@color/colorEipFragmentFont" app:layout_constraintDimensionRatio="1:1" tools:text="A LONG TEXT WITH SEVERAL THINGS BLABLkk" android:gravity="center" diff --git a/app/src/main/res/layout-xlarge/f_eip.xml b/app/src/main/res/layout-xlarge/f_eip.xml index 8ed9a57c..1ea7ba4b 100644 --- a/app/src/main/res/layout-xlarge/f_eip.xml +++ b/app/src/main/res/layout-xlarge/f_eip.xml @@ -80,6 +80,7 @@ android:padding="@dimen/stdpadding" android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large" android:textStyle="bold" + android:textColor="@color/colorEipFragmentFont" app:layout_constraintDimensionRatio="1:1" tools:text="CONNETION SECURE" android:maxLines="1" @@ -96,6 +97,7 @@ android:padding="@dimen/stdpadding" android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" android:textStyle="bold" + android:textColor="@color/colorEipFragmentFont" app:layout_constraintDimensionRatio="1:1" android:maxLines="5" android:ellipsize="end" diff --git a/app/src/main/res/layout/f_eip.xml b/app/src/main/res/layout/f_eip.xml index 0cefcd6c..e3e8fe0a 100644 --- a/app/src/main/res/layout/f_eip.xml +++ b/app/src/main/res/layout/f_eip.xml @@ -97,6 +97,7 @@ android:paddingEnd="@dimen/stdpadding" android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large" android:textStyle="bold" + android:textColor="@color/colorEipFragmentFont" app:layout_constraintDimensionRatio="1:1" tools:text="CONNETION SECURE" /> @@ -111,12 +112,12 @@ app:layout_constraintBottom_toTopOf="@+id/gateway_location_button" android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" android:textStyle="bold" + android:textColor="@color/colorEipFragmentFont" android:paddingLeft="@dimen/stdpadding" android:paddingStart="@dimen/stdpadding" android:paddingRight="@dimen/stdpadding" android:paddingEnd="@dimen/stdpadding" android:paddingBottom="@dimen/stdpadding" - app:layout_constraintDimensionRatio="1:1" tools:text="Your traffic is securly routed through \n another" android:maxLines="2" diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index a8cdb28e..e911a6d1 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -34,6 +34,7 @@ @color/white @color/black800 + @color/black800 #B33A3A -- cgit v1.2.3 From 739e0f16c80da1bad574890d6d8c8f09fa7bbbc0 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sun, 1 Aug 2021 00:50:06 +0200 Subject: make button text color customizable --- app/src/main/res/values/colors.xml | 1 + app/src/main/res/values/styles.xml | 1 + 2 files changed, 2 insertions(+) (limited to 'app/src/main/res') diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index e911a6d1..86ac1128 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -35,6 +35,7 @@ @color/white @color/black800 @color/black800 + @color/black800 #B33A3A diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index b8c0bc59..9b05d3fe 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -65,6 +65,7 @@ @drawable/cust_button_primary 36dp 75dp + @color/colorFontBtn