summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-07-30 15:46:40 +0200
committercyBerta <cyberta@riseup.net>2021-11-15 16:13:41 +0100
commit5c4c3cde26fafbd763e4a879dc46ca959b1a7d27 (patch)
treee8bc88f98be2a1f499f620ab654757c406d816fb /app/src/main/res
parent9818a16e510d42fec32aef5a6efcd6d2ae4aa110 (diff)
draft gateway selection UI according to simlpy secure's proposals
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/f_drawer_main.xml2
-rw-r--r--app/src/main/res/layout/f_gateway_selection.xml34
-rw-r--r--app/src/main/res/layout/v_select_text_list_item.xml16
-rw-r--r--app/src/main/res/values/strings.xml7
4 files changed, 18 insertions, 41 deletions
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 @@
<se.leap.bitmaskclient.base.views.IconTextEntry
android:id="@+id/manualGatewaySelection"
app:text="@string/gateway_selection_title"
- app:subtitle="@string/gateway_selection_best_location"
+ app:subtitle="@string/gateway_selection_recommended_location"
app:icon="@drawable/ic_map_marker_star_black_36dp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
diff --git a/app/src/main/res/layout/f_gateway_selection.xml b/app/src/main/res/layout/f_gateway_selection.xml
index f96b9c08..5a384163 100644
--- a/app/src/main/res/layout/f_gateway_selection.xml
+++ b/app/src/main/res/layout/f_gateway_selection.xml
@@ -11,8 +11,9 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:visibility="gone"
+ android:visibility="visible"
tools:visibility="visible"
+ android:layout_alignParentTop="true"
>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/current_location_description"
@@ -25,7 +26,8 @@
android:paddingEnd="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
- android:text="@string/vpn_securely_routed" />
+
+ android:text="@string/gateway_selection_automatic_location" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/current_location"
@@ -43,26 +45,9 @@
</LinearLayout>
-
-
- <se.leap.bitmaskclient.base.views.IconSwitchEntry
- android:id="@+id/automatic_gateway_switch"
- android:layout_below="@id/current_location_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingTop="@dimen/stdpadding"
- android:paddingStart="@dimen/stdpadding"
- android:paddingLeft="@dimen/stdpadding"
- android:paddingEnd="@dimen/stdpadding"
- android:paddingRight="@dimen/stdpadding"
- app:text="@string/gateway_selection_automatic"
- app:subtitle="@string/gateway_selection_warning"
- app:icon="@drawable/ic_map_marker_star_black_36dp"
- />
-
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/gatewaySelection_list"
- android:layout_below="@id/automatic_gateway_switch"
+ android:layout_below="@id/current_location_container"
android:layout_above="@+id/vpn_button_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -87,12 +72,13 @@
android:layout_height="wrap_content"
android:padding="@dimen/activity_margin"
>
+
<androidx.appcompat.widget.AppCompatButton
- android:id="@+id/vpn_button"
- android:layout_width="wrap_content"
+ android:id="@+id/automatic_gateway_selection_btn"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="end"
- android:text="@string/vpn.button.turn.on" />
+ android:text="@string/gateway_selection_recommended_location"
+ />
</LinearLayout>
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">
<!-- views are composed right to left -->
- <androidx.appcompat.widget.AppCompatImageView
- android:id="@+id/checked_icon"
- android:layout_width="?android:attr/listPreferredItemHeightSmall"
- android:layout_height="?android:attr/listPreferredItemHeightSmall"
- android:layout_gravity="center"
- android:padding="10dp"
- android:layout_alignParentEnd="true"
- android:layout_alignParentRight="true"
- tools:src="@drawable/ic_check_bold"
- android:visibility="visible"
- tools:visibility="visible"
- />
<se.leap.bitmaskclient.base.views.LocationIndicator
android:id="@+id/quality"
android:layout_width="56dp"
android:layout_height="match_parent"
- android:layout_toLeftOf="@+id/checked_icon"
- android:layout_toStartOf="@+id/checked_icon"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
tools:visibility="visible"
/>
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 @@
<string name="version_update_error_permissions">No permissions to install app.</string>
<string name="gateway_selection_title">Select location</string>
<string name="gateway_selection_warning">%s will find the best connection for you.</string>
- <string name="gateway_selection_best_location">Location with best connection</string>
+ <string name="gateway_selection_recommended_location">Use recommended location</string>
<string name="gateway_selection_automatic">Automatic</string>
- <string name="gateway_selection_current_location">Your traffic is currently routed through: </string>
+ <string name="gateway_selection_manual_location">Your traffic is currently routed through: </string>
+ <string name="gateway_selection_manual_not_connected">Your traffic will be routed through: </string>
+ <string name="gateway_selection_automatic_location">Your traffic is automatically routed through the best location:</string>
+ <string name="gateway_selection_automatic_not_connected">Your traffic will be automatically routed through the best location.</string>
<string name="finding_best_connection">Finding best connection…</string>
<string name="reconnecting">Reconnecting…</string>
<string name="tor_starting">Starting bridges for censorship circumvention…</string>