summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2022-11-29 14:01:05 +0100
committercyberta <cyberta@riseup.net>2022-11-30 14:19:39 +0100
commitc2f6bc4e2098265fb1fc8f671dbdecbb5917c6fc (patch)
tree1a1889b6dceebce2e0d63283dd1116b9dc468271 /app/src/main
parent0cf31d76c9f48cc73446b3fde478a46cd29c7594 (diff)
new EipFragment layout for Bitmask - portrait
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/views/LocationButton.java25
-rw-r--r--app/src/main/res/drawable-hdpi/bg_green.pngbin0 -> 190405 bytes
-rw-r--r--app/src/main/res/drawable-hdpi/bg_red.pngbin0 -> 143331 bytes
-rw-r--r--app/src/main/res/drawable-hdpi/bg_yellow.pngbin0 -> 236571 bytes
-rw-r--r--app/src/main/res/drawable-hdpi/green_mask.pngbin0 -> 81235 bytes
-rw-r--r--app/src/main/res/drawable-hdpi/red_mask.pngbin0 -> 73514 bytes
-rw-r--r--app/src/main/res/drawable-hdpi/yellow_mask.pngbin0 -> 80386 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/bg_green.pngbin0 -> 319429 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/bg_red.pngbin0 -> 220676 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/bg_yellow.pngbin0 -> 400307 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/green_mask.pngbin0 -> 121655 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/red_mask.pngbin0 -> 116193 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/yellow_mask.pngbin0 -> 122701 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/bg_green.pngbin0 -> 701727 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/bg_red.pngbin0 -> 446155 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/bg_yellow.pngbin0 -> 828368 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/green_mask.pngbin0 -> 220730 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/red_mask.pngbin0 -> 222370 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/yellow_mask.pngbin0 -> 226345 bytes
-rw-r--r--app/src/main/res/drawable-xxxhdpi/bg_green.pngbin0 -> 1228810 bytes
-rw-r--r--app/src/main/res/drawable-xxxhdpi/bg_red.pngbin0 -> 745847 bytes
-rw-r--r--app/src/main/res/drawable-xxxhdpi/bg_yellow.pngbin0 -> 1489207 bytes
-rw-r--r--app/src/main/res/drawable-xxxhdpi/green_mask.pngbin0 -> 324196 bytes
-rw-r--r--app/src/main/res/drawable-xxxhdpi/red_mask.pngbin0 -> 362086 bytes
-rw-r--r--app/src/main/res/drawable-xxxhdpi/yellow_mask.pngbin0 -> 334967 bytes
-rw-r--r--app/src/main/res/drawable/bg_green.pngbin0 -> 90299 bytes
-rw-r--r--app/src/main/res/drawable/bg_red.pngbin0 -> 143331 bytes
-rw-r--r--app/src/main/res/drawable/bg_yellow.pngbin0 -> 112042 bytes
-rw-r--r--app/src/main/res/drawable/green_mask.pngbin0 -> 47593 bytes
-rw-r--r--app/src/main/res/drawable/red_mask.pngbin0 -> 40172 bytes
-rw-r--r--app/src/main/res/drawable/yellow_mask.pngbin0 -> 47055 bytes
-rw-r--r--app/src/main/res/layout/v_location_button.xml33
-rw-r--r--app/src/main/res/values/colors.xml5
-rw-r--r--app/src/main/res/values/strings.xml3
34 files changed, 42 insertions, 24 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/views/LocationButton.java b/app/src/main/java/se/leap/bitmaskclient/base/views/LocationButton.java
index b2182d61..2118ecb5 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/views/LocationButton.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/views/LocationButton.java
@@ -1,17 +1,25 @@
package se.leap.bitmaskclient.base.views;
import android.content.Context;
+import android.content.res.ColorStateList;
+import android.graphics.drawable.ColorDrawable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RelativeLayout;
+import androidx.annotation.ColorRes;
+import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatTextView;
+import androidx.core.content.ContextCompat;
+import androidx.core.view.LayoutInflaterCompat;
+import androidx.core.view.ViewCompat;
import se.leap.bitmaskclient.R;
+import se.leap.bitmaskclient.databinding.VLocationButtonBinding;
import se.leap.bitmaskclient.eip.GatewaysManager;
public class LocationButton extends RelativeLayout {
@@ -31,13 +39,16 @@ public class LocationButton extends RelativeLayout {
}
private void initLayout(Context context) {
- LayoutInflater inflater = (LayoutInflater) context
- .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- View rootview = inflater.inflate(R.layout.v_location_button, this, true);
- locationIndicator = rootview.findViewById(R.id.load_indicator);
- textView = rootview.findViewById(R.id.text_location);
- bridgeView = rootview.findViewById(R.id.bridge_icn);
- recommendedView = rootview.findViewById(R.id.recommended_icn);
+ VLocationButtonBinding binding = VLocationButtonBinding.inflate(LayoutInflater.from(context), this, true);
+ locationIndicator = binding.loadIndicator;
+ textView = binding.textLocation;
+ bridgeView = binding.bridgeIcn;
+ recommendedView = binding.recommendedIcn;
+
+ }
+
+ public void setTextColor(@ColorRes int color) {
+ textView.setTextColor(ContextCompat.getColor(getContext(), color));
}
public void setLocationLoad(GatewaysManager.Load load) {
diff --git a/app/src/main/res/drawable-hdpi/bg_green.png b/app/src/main/res/drawable-hdpi/bg_green.png
new file mode 100644
index 00000000..0e98f705
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/bg_green.png
Binary files differ
diff --git a/app/src/main/res/drawable-hdpi/bg_red.png b/app/src/main/res/drawable-hdpi/bg_red.png
new file mode 100644
index 00000000..de96be57
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/bg_red.png
Binary files differ
diff --git a/app/src/main/res/drawable-hdpi/bg_yellow.png b/app/src/main/res/drawable-hdpi/bg_yellow.png
new file mode 100644
index 00000000..24632712
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/bg_yellow.png
Binary files differ
diff --git a/app/src/main/res/drawable-hdpi/green_mask.png b/app/src/main/res/drawable-hdpi/green_mask.png
new file mode 100644
index 00000000..fccc060a
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/green_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable-hdpi/red_mask.png b/app/src/main/res/drawable-hdpi/red_mask.png
new file mode 100644
index 00000000..d2ef7d99
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/red_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable-hdpi/yellow_mask.png b/app/src/main/res/drawable-hdpi/yellow_mask.png
new file mode 100644
index 00000000..72e3ae45
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/yellow_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/bg_green.png b/app/src/main/res/drawable-xhdpi/bg_green.png
new file mode 100644
index 00000000..915dff95
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/bg_green.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/bg_red.png b/app/src/main/res/drawable-xhdpi/bg_red.png
new file mode 100644
index 00000000..433c776f
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/bg_red.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/bg_yellow.png b/app/src/main/res/drawable-xhdpi/bg_yellow.png
new file mode 100644
index 00000000..be4469df
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/bg_yellow.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/green_mask.png b/app/src/main/res/drawable-xhdpi/green_mask.png
new file mode 100644
index 00000000..c852459d
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/green_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/red_mask.png b/app/src/main/res/drawable-xhdpi/red_mask.png
new file mode 100644
index 00000000..c0d57a03
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/red_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/yellow_mask.png b/app/src/main/res/drawable-xhdpi/yellow_mask.png
new file mode 100644
index 00000000..d81190fe
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/yellow_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/bg_green.png b/app/src/main/res/drawable-xxhdpi/bg_green.png
new file mode 100644
index 00000000..cd78d865
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/bg_green.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/bg_red.png b/app/src/main/res/drawable-xxhdpi/bg_red.png
new file mode 100644
index 00000000..ffbcdb79
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/bg_red.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/bg_yellow.png b/app/src/main/res/drawable-xxhdpi/bg_yellow.png
new file mode 100644
index 00000000..718e102f
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/bg_yellow.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/green_mask.png b/app/src/main/res/drawable-xxhdpi/green_mask.png
new file mode 100644
index 00000000..32286177
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/green_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/red_mask.png b/app/src/main/res/drawable-xxhdpi/red_mask.png
new file mode 100644
index 00000000..ac560317
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/red_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/yellow_mask.png b/app/src/main/res/drawable-xxhdpi/yellow_mask.png
new file mode 100644
index 00000000..75cf3782
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/yellow_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/bg_green.png b/app/src/main/res/drawable-xxxhdpi/bg_green.png
new file mode 100644
index 00000000..3c9d97b4
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/bg_green.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/bg_red.png b/app/src/main/res/drawable-xxxhdpi/bg_red.png
new file mode 100644
index 00000000..2503f135
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/bg_red.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/bg_yellow.png b/app/src/main/res/drawable-xxxhdpi/bg_yellow.png
new file mode 100644
index 00000000..bff2004c
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/bg_yellow.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/green_mask.png b/app/src/main/res/drawable-xxxhdpi/green_mask.png
new file mode 100644
index 00000000..f5a5adaf
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/green_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/red_mask.png b/app/src/main/res/drawable-xxxhdpi/red_mask.png
new file mode 100644
index 00000000..9e216955
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/red_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/yellow_mask.png b/app/src/main/res/drawable-xxxhdpi/yellow_mask.png
new file mode 100644
index 00000000..806dcbf4
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/yellow_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable/bg_green.png b/app/src/main/res/drawable/bg_green.png
new file mode 100644
index 00000000..6da7878d
--- /dev/null
+++ b/app/src/main/res/drawable/bg_green.png
Binary files differ
diff --git a/app/src/main/res/drawable/bg_red.png b/app/src/main/res/drawable/bg_red.png
new file mode 100644
index 00000000..de96be57
--- /dev/null
+++ b/app/src/main/res/drawable/bg_red.png
Binary files differ
diff --git a/app/src/main/res/drawable/bg_yellow.png b/app/src/main/res/drawable/bg_yellow.png
new file mode 100644
index 00000000..c371f3f0
--- /dev/null
+++ b/app/src/main/res/drawable/bg_yellow.png
Binary files differ
diff --git a/app/src/main/res/drawable/green_mask.png b/app/src/main/res/drawable/green_mask.png
new file mode 100644
index 00000000..e515f3f5
--- /dev/null
+++ b/app/src/main/res/drawable/green_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable/red_mask.png b/app/src/main/res/drawable/red_mask.png
new file mode 100644
index 00000000..a4bd4a78
--- /dev/null
+++ b/app/src/main/res/drawable/red_mask.png
Binary files differ
diff --git a/app/src/main/res/drawable/yellow_mask.png b/app/src/main/res/drawable/yellow_mask.png
new file mode 100644
index 00000000..98dd7978
--- /dev/null
+++ b/app/src/main/res/drawable/yellow_mask.png
Binary files differ
diff --git a/app/src/main/res/layout/v_location_button.xml b/app/src/main/res/layout/v_location_button.xml
index d304d429..44a4c67e 100644
--- a/app/src/main/res/layout/v_location_button.xml
+++ b/app/src/main/res/layout/v_location_button.xml
@@ -39,31 +39,30 @@
android:visibility="gone"
tools:visibility="visible"
/>
+
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/text_location"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_centerInParent="true"
+ android:layout_gravity="center_vertical"
+ android:layout_toStartOf="@+id/bridge_icn"
+ android:layout_toLeftOf="@+id/bridge_icn"
+ android:layout_toEndOf="@id/recommended_icn"
+ android:layout_toRightOf="@+id/recommended_icn"
+ android:ellipsize="end"
+ android:gravity="center_vertical"
+ android:maxLines="1"
android:paddingStart="@dimen/stdpadding"
android:paddingLeft="@dimen/stdpadding"
android:paddingEnd="@dimen/stdpadding"
android:paddingRight="@dimen/stdpadding"
- android:maxLines="1"
- android:ellipsize="end"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- app:autoSizeTextType="uniform"
- android:gravity="center_vertical"
- app:autoSizeMinTextSize="15sp"
- app:autoSizeMaxTextSize="24sp"
- android:layout_toEndOf="@id/recommended_icn"
- android:layout_toRightOf="@+id/recommended_icn"
- android:layout_toLeftOf="@+id/bridge_icn"
- android:layout_toStartOf="@+id/bridge_icn"
- android:layout_gravity="center_vertical"
- android:layout_centerInParent="true"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textStyle="bold"
- android:textColor="@color/white"
- tools:text="Seattle along message"
- />
+ app:autoSizeMaxTextSize="24sp"
+ app:autoSizeMinTextSize="15sp"
+ app:autoSizeTextType="uniform"
+ tools:text="Seattle along message" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/bridge_icn"
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index dbc7326f..7ec2e81a 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -52,5 +52,10 @@
<color name="btn_yellow_dark">#C78F00</color>
<color name="btn_green">#9FC17F</color>
<color name="btn_green_dark">#709152</color>
+ <color name="btn_white_transparent">#CCFFFEFE</color>
+ <color name="btn_white_transparent_dark">#CCCCCBCB</color>
+ <color name="bg_red_1">#EC6767</color>
+ <color name="bg_red_2">#DB6F66</color>
+ <color name="bg_red_3">#D05D59</color>
</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 92229e44..722f10ed 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -67,6 +67,9 @@
<string name="authentication_failed_message">Authentication failed</string>
<string name="registration_failed_message">Registration failed</string>
<string name="eip_status_start_pending">Initiating connection</string>
+ <string name="eip_status_connecting">Connecting VPN</string>
+ <string name="eip_status_unsecured">Unsecured Connection</string>
+ <string name="eip_status_secured">Secured Connection</string>
<string name="eip_cancel_connect_title">Cancel connection?</string>
<string name="eip_cancel_connect_text">There is a connection attempt in progress. Do you wish to cancel it?</string>
<string name="eip.warning.browser_inconsistency">Turn off VPN connection? When the VPN is off, you may leak personal information to your Internet provider or local network.</string>