summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-07-31 16:34:09 +0200
committercyBerta <cyberta@riseup.net>2021-11-15 16:13:41 +0100
commit546b823b0c1694657e6b63f23d8b72015b00d282 (patch)
treeee5f351bd8807e675c31b061ff1ad02e47ad85d0 /app
parentd8b11c392a492ef05b1a454c298f5244a694553b (diff)
adapt EIP main screen and strings to simply secure proposals
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java1
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java10
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java39
-rw-r--r--app/src/main/res/layout-port/f_eip.xml108
-rw-r--r--app/src/main/res/layout-xlarge-port/f_eip.xml119
-rw-r--r--app/src/main/res/layout-xlarge/f_eip.xml61
-rw-r--r--app/src/main/res/layout/f_eip.xml103
-rw-r--r--app/src/main/res/layout/v_location_button.xml3
-rw-r--r--app/src/main/res/values/untranslatable.xml8
9 files changed, 391 insertions, 61 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
index 9ed2054e..ae38a59b 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
@@ -377,6 +377,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
// connections[n], n>0 gets choosen?
Connection connection = mProfile.mConnections[0];
+ VpnStatus.setCurrentlyConnectingProfile(mProfile);
VpnStatus.logInfo(R.string.building_configration);
VpnStatus.updateStateString("VPN_GENERATE_CONFIG", "", R.string.building_configration, ConnectionStatus.LEVEL_START);
diff --git a/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
index 8007f7c5..a8fed675 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
@@ -48,6 +48,7 @@ public class VpnStatus {
final static java.lang.Object readFileLock = new Object();
private static VpnProfile lastConnectedProfile;
+ private static VpnProfile currentlyConnectingProfile;
public static TrafficHistory trafficHistory;
@@ -170,6 +171,15 @@ public class VpnStatus {
}
+ public static void setCurrentlyConnectingProfile(VpnProfile connectingProfile) {
+ currentlyConnectingProfile = connectingProfile;
+ }
+
+ public static String getCurrentlyConnectingVpnName() {
+ return currentlyConnectingProfile != null ? currentlyConnectingProfile.mName : null;
+ }
+
+
public static String getLastConnectedVpnName() {
return lastConnectedProfile != null ? lastConnectedProfile.mName : null;
}
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java
index af34b7a5..e9402468 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java
@@ -39,6 +39,7 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.AppCompatImageView;
+import androidx.appcompat.widget.AppCompatTextView;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
@@ -50,6 +51,7 @@ import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
+import de.blinkt.openvpn.VpnProfile;
import de.blinkt.openvpn.core.ConnectionStatus;
import de.blinkt.openvpn.core.IOpenVPNServiceInternal;
import de.blinkt.openvpn.core.OpenVPNService;
@@ -84,6 +86,7 @@ import static se.leap.bitmaskclient.base.models.Constants.REQUEST_CODE_LOG_IN;
import static se.leap.bitmaskclient.base.models.Constants.REQUEST_CODE_SWITCH_PROVIDER;
import static se.leap.bitmaskclient.base.models.Constants.SHARED_PREFERENCES;
import static se.leap.bitmaskclient.base.utils.ConfigHelper.isDefaultBitmask;
+import static se.leap.bitmaskclient.base.utils.PreferenceHelper.getPreferredCity;
import static se.leap.bitmaskclient.base.utils.ViewHelper.convertDimensionToPx;
import static se.leap.bitmaskclient.eip.EipSetupObserver.gatewayOrder;
import static se.leap.bitmaskclient.eip.EipSetupObserver.reconnectingWithDifferentGateway;
@@ -109,6 +112,12 @@ public class EipFragment extends Fragment implements Observer {
@BindView(R.id.gateway_location_button)
LocationButton locationButton;
+ @BindView(R.id.main_description)
+ AppCompatTextView mainDescription;
+
+ @BindView(R.id.sub_description)
+ AppCompatTextView subDescription;
+
private Unbinder unbinder;
private EipStatus eipStatus;
@@ -408,21 +417,20 @@ public class EipFragment extends Fragment implements Observer {
return;
}
- //Log.d(TAG, "eip fragment eipStatus state: " + eipStatus.getState() + " - level: " + eipStatus.getLevel() + " - is reconnecting: " + eipStatus.isReconnecting());
-
-
+ Log.d(TAG, "eip fragment eipStatus state: " + eipStatus.getState() + " - level: " + eipStatus.getLevel() + " - is reconnecting: " + eipStatus.isReconnecting());
if (eipStatus.isConnecting() ) {
setMainButtonEnabled(true);
showConnectingLayout(activity);
if (eipStatus.isReconnecting()) {
- locationButton.setText(getString(R.string.reconnecting));
+ subDescription.setText(getString(R.string.reconnecting));
} else {
- locationButton.setText(getString(R.string.finding_best_connection));
+ subDescription.setText(R.string.connection_not_connected);
}
+ locationButton.setText(getString(R.string.finding_best_connection));
+ mainDescription.setText(R.string.eip_state_insecure);
locationButton.setVisibility(VISIBLE);
locationButton.setLocationLoad(UNKNOWN);
- } else if (eipStatus.isConnected() ) {
- locationButton.setText(activity.getString(R.string.vpn_button_turn_off));
+ } else if (eipStatus.isConnected()) {
setMainButtonEnabled(true);
vpnStateImage.setStateIcon(R.drawable.vpn_connected);
vpnStateImage.stopProgress(false);
@@ -430,23 +438,34 @@ public class EipFragment extends Fragment implements Observer {
locationButton.setText(VpnStatus.getLastConnectedVpnName());
locationButton.setVisibility(VISIBLE);
colorBackground();
+ mainDescription.setText(R.string.eip_state_connected);
+ subDescription.setText(getPreferredCity(getContext()) == null ?
+ R.string.eip_state_connected_recommended :
+ R.string.eip_state_connected_manual);
} else if(isOpenVpnRunningWithoutNetwork()){
- locationButton.setText(activity.getString(R.string.vpn_button_turn_off));
+ Log.d(TAG, "eip fragment eipStatus - isOpenVpnRunningWithoutNetwork");
setMainButtonEnabled(true);
vpnStateImage.setStateIcon(R.drawable.vpn_disconnected);
vpnStateImage.stopProgress(false);
locationButton.setVisibility(VISIBLE);
+ locationButton.setText(VpnStatus.getCurrentlyConnectingVpnName());
setVpnRouteText();
colorBackgroundALittle();
+ mainDescription.setText(R.string.eip_state_insecure);
+ subDescription.setText(R.string.eip_state_no_network);
} else if (eipStatus.isDisconnected() && reconnectingWithDifferentGateway()) {
showConnectingLayout(activity);
// showRetryToast(activity);
locationButton.setText(getString(R.string.finding_best_connection));
locationButton.setVisibility(VISIBLE);
locationButton.setLocationLoad(UNKNOWN);
+ mainDescription.setText(R.string.eip_state_insecure);
+ subDescription.setText(R.string.reconnecting);
} else if (eipStatus.isDisconnecting()) {
setMainButtonEnabled(false);
showDisconnectingLayout(activity);
+ mainDescription.setText(R.string.eip_state_insecure);
+ subDescription.setText(R.string.connection_not_connected);
} else if (eipStatus.isBlocking()) {
setMainButtonEnabled(true);
vpnStateImage.setStateIcon(R.drawable.vpn_blocking);
@@ -455,6 +474,8 @@ public class EipFragment extends Fragment implements Observer {
locationButton.setText(getString(R.string.finding_best_connection));
locationButton.setVisibility(VISIBLE);
locationButton.setLocationLoad(UNKNOWN);
+ mainDescription.setText(R.string.eip_state_connected);
+ subDescription.setText(R.string.eip_state_blocking);
} else {
locationButton.setText(activity.getString(R.string.vpn_button_turn_on));
setMainButtonEnabled(true);
@@ -463,6 +484,8 @@ public class EipFragment extends Fragment implements Observer {
greyscaleBackground();
locationButton.setLocationLoad(UNKNOWN);
locationButton.setVisibility(GONE);
+ mainDescription.setText(R.string.eip_state_insecure);
+ subDescription.setText(R.string.connection_not_connected);
}
}
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/eipServiceFragment">
+
+ <androidx.constraintlayout.widget.Guideline
+ android:id="@+id/guideline_vertical_left"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:orientation="vertical"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintGuide_percent="0.225"
+ />
+
+
+ <androidx.constraintlayout.widget.Guideline
+ android:id="@+id/guideline_horizontal_bottom"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:orientation="horizontal"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintGuide_percent="0.66"
+ />
+
+ <androidx.constraintlayout.widget.Guideline
+ android:id="@+id/guideline_vertical_right"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:orientation="vertical"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintGuide_percent="0.775"
+ />
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/background"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="fitXY"
+ app:srcCompat="@drawable/background_eip" />
+
+ <se.leap.bitmaskclient.base.views.VpnStateImage
+ android:id="@+id/vpn_state_image"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_margin="@dimen/stdpadding"
+ app:layout_constraintBottom_toTopOf="@+id/guideline_horizontal_bottom"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintEnd_toStartOf="@+id/guideline_vertical_right"
+ app:layout_constraintStart_toStartOf="@+id/guideline_vertical_left"
+ app:layout_constraintTop_toTopOf="parent"
+ />
+
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/main_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:layout_constraintTop_toBottomOf="@id/vpn_state_image"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/sub_description"
+ android:padding="@dimen/activity_margin"
+ android:textAppearance="@android:style/TextAppearance.Large"
+ android:textStyle="bold"
+ app:layout_constraintDimensionRatio="1:1"
+ tools:text="CONNETION"
+ android:gravity="center"
+ android:maxLines="1"
+ />
+
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/sub_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:layout_constraintTop_toBottomOf="@id/main_description"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/gateway_location_button"
+ android:padding="@dimen/activity_margin"
+ android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
+ android:textStyle="bold"
+ app:layout_constraintDimensionRatio="1:1"
+ tools:text="A LONG TEXT WITH SEVERAL THINGS BLABLkk \n kdjfkj \n kjdfkjdf"
+ android:gravity="center"
+ android:maxLines="3"
+ android:ellipsize="end"
+ />
+
+ <se.leap.bitmaskclient.base.views.LocationButton
+ android:id="@+id/gateway_location_button"
+ android:layout_width="match_parent"
+ android:layout_height="64dp"
+ android:layout_marginBottom="@dimen/stdpadding"
+ android:layout_marginEnd="@dimen/stdpadding"
+ android:layout_marginStart="@dimen/stdpadding"
+ android:layout_marginTop="@dimen/stdpadding"
+ android:layout_marginLeft="@dimen/stdpadding"
+ android:layout_marginRight="@dimen/stdpadding"
+ app:layout_constraintBottom_toBottomOf="@+id/background"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ tools:text="SEATTLE"
+ android:gravity="center_vertical" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:id="@+id/eipServiceFragment"
+ >
+
+ <androidx.constraintlayout.widget.Guideline
+ android:id="@+id/guideline_horizontal_top"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:orientation="horizontal"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintGuide_percent="0.0"
+ app:layout_constraintRight_toRightOf="parent" />
+
+ <androidx.constraintlayout.widget.Guideline
+ android:id="@+id/guideline_vertical_left"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:orientation="vertical"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintGuide_percent="0.2"
+ />
+
+
+ <androidx.constraintlayout.widget.Guideline
+ android:id="@+id/guideline_horizontal_bottom"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:orientation="horizontal"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintGuide_percent="0.7"
+ />
+
+ <androidx.constraintlayout.widget.Guideline
+ android:id="@+id/guideline_vertical_right"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:orientation="vertical"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintGuide_percent="0.8"
+ />
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/background"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="fitXY"
+ app:srcCompat="@drawable/background_eip" />
+
+
+ <se.leap.bitmaskclient.base.views.VpnStateImage
+ android:id="@+id/vpn_state_image"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_margin="@dimen/stdpadding"
+ app:layout_constraintBottom_toTopOf="@+id/guideline_horizontal_bottom"
+ app:layout_constraintDimensionRatio="1:1"
+ app:layout_constraintEnd_toStartOf="@+id/guideline_vertical_right"
+ app:layout_constraintStart_toStartOf="@+id/guideline_vertical_left"
+ app:layout_constraintTop_toTopOf="@+id/guideline_horizontal_top"
+ app:layout_constraintVertical_bias="0.4" />
+
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/main_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:layout_constraintTop_toBottomOf="@id/vpn_state_image"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/sub_description"
+ android:padding="@dimen/activity_margin"
+ android:textAppearance="@android:style/TextAppearance.Large"
+ android:textStyle="bold"
+ app:layout_constraintDimensionRatio="1:1"
+ tools:text="CONNETION"
+ android:gravity="center"
+ android:maxLines="1"
+ />
+
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/sub_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:layout_constraintTop_toBottomOf="@id/main_description"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/gateway_location_button"
+ android:padding="@dimen/activity_margin"
+ android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
+ android:textStyle="bold"
+ app:layout_constraintDimensionRatio="1:1"
+ tools:text="A LONG TEXT WITH SEVERAL THINGS BLABLkk"
+ android:gravity="center"
+ android:maxLines="2"
+ android:ellipsize="end"
+ />
+
+ <se.leap.bitmaskclient.base.views.LocationButton
+ android:id="@+id/gateway_location_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/stdpadding"
+ android:layout_marginEnd="@dimen/stdpadding"
+ android:layout_marginStart="@dimen/stdpadding"
+ android:layout_marginTop="@dimen/stdpadding"
+ android:layout_marginLeft="@dimen/stdpadding"
+ android:layout_marginRight="@dimen/stdpadding"
+ app:layout_constraintBottom_toBottomOf="@+id/background"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ tools:text="SEATTLE"
+ android:gravity="center_vertical" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
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 @@
<?xml version="1.0" encoding="utf-8"?>
+<!--
+ This is the layout for extra large landscape, extra large portrait
+ can be found in layout-xlarge-port
+-->
<androidx.constraintlayout.widget.ConstraintLayout 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"
@@ -14,7 +18,7 @@
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintGuide_percent="0.3"
+ app:layout_constraintGuide_percent="0.0"
/>
<androidx.constraintlayout.widget.Guideline
@@ -23,7 +27,7 @@
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintGuide_percent="0.3"
+ app:layout_constraintGuide_percent="0.2"
/>
@@ -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"
/>
<androidx.constraintlayout.widget.Guideline
@@ -43,7 +47,7 @@
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintGuide_percent="0.7"
+ app:layout_constraintGuide_percent="0.8"
/>
<androidx.appcompat.widget.AppCompatImageView
@@ -54,21 +58,6 @@
app:srcCompat="@drawable/background_eip" />
- <androidx.appcompat.widget.AppCompatTextView
- android:id="@+id/eipLabel"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="@dimen/stdpadding"
- android:paddingRight="@dimen/stdpadding"
- android:paddingStart="@dimen/stdpadding"
- android:paddingEnd="@dimen/stdpadding"
- android:text="@string/eip_service_label"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="center"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
-
<se.leap.bitmaskclient.base.views.VpnStateImage
android:id="@+id/vpn_state_image"
android:layout_width="0dp"
@@ -80,6 +69,40 @@
app:layout_constraintTop_toTopOf="@+id/guideline_horizontal_top"
app:layout_constraintDimensionRatio="1:1" />
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/main_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:layout_constraintTop_toBottomOf="@id/guideline_horizontal_bottom"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/sub_description"
+ android:padding="@dimen/stdpadding"
+ android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large"
+ android:textStyle="bold"
+ app:layout_constraintDimensionRatio="1:1"
+ tools:text="CONNETION SECURE"
+ android:maxLines="1"
+ />
+
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/sub_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:layout_constraintTop_toBottomOf="@id/main_description"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/gateway_location_button"
+ android:padding="@dimen/stdpadding"
+ android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
+ android:textStyle="bold"
+ app:layout_constraintDimensionRatio="1:1"
+ android:maxLines="5"
+ android:ellipsize="end"
+ tools:text="Your traffic is securly routed through"
+ android:gravity="center"
+
+ />
<se.leap.bitmaskclient.base.views.LocationButton
android:id="@+id/gateway_location_button"
diff --git a/app/src/main/res/layout/f_eip.xml b/app/src/main/res/layout/f_eip.xml
index 8dc1e33b..0cefcd6c 100644
--- a/app/src/main/res/layout/f_eip.xml
+++ b/app/src/main/res/layout/f_eip.xml
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
+<!--
+ This is the default layout for landscape, portrait can be found
+ in layout-port
+-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@@ -12,9 +16,8 @@
android:layout_height="0dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintGuide_percent="0.225"
- />
+ app:layout_constraintGuide_percent="0.1"
+ app:layout_constraintRight_toRightOf="parent" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_vertical_left"
@@ -22,8 +25,7 @@
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintGuide_percent="0.225"
- />
+ app:layout_constraintGuide_percent="0.3" />
<androidx.constraintlayout.widget.Guideline
@@ -32,18 +34,34 @@
android:layout_height="0dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintGuide_percent="0.775"
+ app:layout_constraintGuide_percent="0.55"
+ app:layout_constraintRight_toRightOf="parent" />
+
+ <androidx.constraintlayout.widget.Guideline
+ android:id="@+id/guideline_horizontal_button_top"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:orientation="horizontal"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintGuide_percent="0.8"
/>
<androidx.constraintlayout.widget.Guideline
+ android:id="@+id/guideline_horizontal_button_bottom"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:orientation="horizontal"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintGuide_percent="0.98"
+ app:layout_constraintRight_toRightOf="parent" />
+
+ <androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_vertical_right"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintGuide_percent="0.775"
- />
+ app:layout_constraintGuide_percent="0.7" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/background"
@@ -53,48 +71,71 @@
app:srcCompat="@drawable/background_eip" />
- <androidx.appcompat.widget.AppCompatTextView
- android:id="@+id/eipLabel"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="@dimen/stdpadding"
- android:paddingRight="@dimen/stdpadding"
- android:paddingStart="@dimen/stdpadding"
- android:paddingEnd="@dimen/stdpadding"
- android:paddingTop="@dimen/stdpadding"
- android:text="@string/eip_service_label"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="center"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
-
-
<se.leap.bitmaskclient.base.views.VpnStateImage
android:id="@+id/vpn_state_image"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/stdpadding"
+ app:layout_constraintTop_toBottomOf="@id/guideline_horizontal_top"
app:layout_constraintBottom_toTopOf="@+id/guideline_horizontal_bottom"
app:layout_constraintEnd_toStartOf="@+id/guideline_vertical_right"
app:layout_constraintStart_toStartOf="@+id/guideline_vertical_left"
- app:layout_constraintTop_toTopOf="@+id/guideline_horizontal_top"
app:layout_constraintDimensionRatio="1:1"
/>
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/main_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:layout_constraintTop_toBottomOf="@id/guideline_horizontal_bottom"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/sub_description"
+ android:paddingLeft="@dimen/stdpadding"
+ android:paddingStart="@dimen/stdpadding"
+ android:paddingRight="@dimen/stdpadding"
+ android:paddingEnd="@dimen/stdpadding"
+ android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large"
+ android:textStyle="bold"
+ app:layout_constraintDimensionRatio="1:1"
+ tools:text="CONNETION SECURE"
+ />
+
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/sub_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:layout_constraintTop_toBottomOf="@id/main_description"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/gateway_location_button"
+ android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
+ android:textStyle="bold"
+ 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"
+ android:gravity="center"
+ />
+
<se.leap.bitmaskclient.base.views.LocationButton
android:id="@+id/gateway_location_button"
android:layout_width="match_parent"
- android:layout_height="64dp"
- android:layout_marginBottom="@dimen/stdpadding"
+ android:layout_height="0dp"
android:layout_marginEnd="@dimen/stdpadding"
android:layout_marginStart="@dimen/stdpadding"
- android:layout_marginTop="@dimen/stdpadding"
+
android:layout_marginLeft="@dimen/stdpadding"
android:layout_marginRight="@dimen/stdpadding"
- app:layout_constraintBottom_toBottomOf="@+id/background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/guideline_horizontal_button_top"
+ app:layout_constraintBottom_toBottomOf="@+id/guideline_horizontal_button_bottom"
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
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">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text_location"
- android:padding="@dimen/stdpadding"
android:layout_weight="1"
android:layout_width="0dp"
android:maxLines="1"
diff --git a/app/src/main/res/values/untranslatable.xml b/app/src/main/res/values/untranslatable.xml
index a288d9a5..ec795f57 100644
--- a/app/src/main/res/values/untranslatable.xml
+++ b/app/src/main/res/values/untranslatable.xml
@@ -50,6 +50,12 @@
<string name="warning_bridges_not_supported" translatable="false">%1$s doesn\'t support bridges to circumvent VPN filtering. Do you want to choose a different location or disable bridges?</string>
<string name="option_disable_bridges" translatable="false">Disable bridges</string>
<string name="option_different_location" translatable="false">Choose different location</string>
-
+ <string name="eip_state_insecure" translatable="false">Connection Insecure</string>
+ <string name="eip_state_connected_recommended" translatable="false">You are connected to the recommended location</string>
+ <string name="eip_state_connected_manual" translatable="false">You are connected to</string>
+ <string name="eip_state_connecting" translatable="false">Connecting...</string>
+ <string name="connection_not_connected" translatable="false">You may be leaking information to your internet provider or local network.</string>
+ <string name="eip_state_no_network" translatable="false">You have no working Internet connection. Once you get it back, you will be automatically connected to</string>
+ <string name="eip_state_blocking" translatable="false">%1$s is blocking all internet traffic.</string>
</resources> \ No newline at end of file