summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-11-15 14:09:17 +0100
committercyBerta <cyberta@riseup.net>2021-11-15 14:09:17 +0100
commit580c97e368cd0d9fa47691f70cc31e9b711581ec (patch)
treec164b25493b9f4c7cb0c505a124d3cc30f6386ed /app/src/main/res
parentaeadefa699db964b1a4ca3ee2bbd45a80ae847a7 (diff)
implement a new fancy on-off-button
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/main_btn_glow.xml15
-rw-r--r--app/src/main/res/drawable/on_off_btn_fill.pngbin0 -> 41384 bytes
-rw-r--r--app/src/main/res/drawable/on_off_btn_start_2_disabled.pngbin0 -> 33323 bytes
-rw-r--r--app/src/main/res/drawable/on_off_btn_start_2_enabled.pngbin0 -> 31261 bytes
-rw-r--r--app/src/main/res/drawable/on_off_btn_start_2_no_shadow.pngbin0 -> 20182 bytes
-rw-r--r--app/src/main/res/drawable/on_off_btn_start_2_pressed.pngbin0 -> 28721 bytes
-rw-r--r--app/src/main/res/drawable/on_off_btn_start_animation1.pngbin0 -> 32481 bytes
-rw-r--r--app/src/main/res/drawable/on_off_btn_start_animation2.pngbin0 -> 36701 bytes
-rw-r--r--app/src/main/res/drawable/on_off_btn_start_animation3.pngbin0 -> 39980 bytes
-rw-r--r--app/src/main/res/drawable/on_off_btn_start_animation4.pngbin0 -> 41982 bytes
-rw-r--r--app/src/main/res/drawable/on_off_btn_start_animation5.pngbin0 -> 43093 bytes
-rw-r--r--app/src/main/res/layout-port/f_eip.xml6
-rw-r--r--app/src/main/res/layout-xlarge-port/f_eip.xml6
-rw-r--r--app/src/main/res/layout-xlarge/f_eip.xml4
-rw-r--r--app/src/main/res/layout/f_eip.xml4
-rw-r--r--app/src/main/res/layout/v_main_btn.xml52
-rw-r--r--app/src/main/res/values/colors.xml1
17 files changed, 78 insertions, 10 deletions
diff --git a/app/src/main/res/drawable/main_btn_glow.xml b/app/src/main/res/drawable/main_btn_glow.xml
new file mode 100644
index 00000000..e740e96f
--- /dev/null
+++ b/app/src/main/res/drawable/main_btn_glow.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false">
+ <item android:drawable="@drawable/on_off_btn_start_animation1" android:duration="140" />
+ <item android:drawable="@drawable/on_off_btn_start_animation2" android:duration="120" />
+ <item android:drawable="@drawable/on_off_btn_start_animation3" android:duration="100" />
+ <item android:drawable="@drawable/on_off_btn_start_animation4" android:duration="75" />
+ <item android:drawable="@drawable/on_off_btn_start_animation3" android:duration="90" />
+ <item android:drawable="@drawable/on_off_btn_start_animation2" android:duration="90" />
+ <item android:drawable="@drawable/on_off_btn_start_animation3" android:duration="100" />
+ <item android:drawable="@drawable/on_off_btn_start_animation4" android:duration="150" />
+ <item android:drawable="@drawable/on_off_btn_start_animation5" android:duration="200" />
+ <item android:drawable="@drawable/on_off_btn_start_animation4" android:duration="150" />
+ <item android:drawable="@drawable/on_off_btn_start_animation3" android:duration="100" />
+ <item android:drawable="@drawable/on_off_btn_start_animation2" android:duration="120" />
+</animation-list> \ No newline at end of file
diff --git a/app/src/main/res/drawable/on_off_btn_fill.png b/app/src/main/res/drawable/on_off_btn_fill.png
new file mode 100644
index 00000000..8394ccfb
--- /dev/null
+++ b/app/src/main/res/drawable/on_off_btn_fill.png
Binary files differ
diff --git a/app/src/main/res/drawable/on_off_btn_start_2_disabled.png b/app/src/main/res/drawable/on_off_btn_start_2_disabled.png
new file mode 100644
index 00000000..4675e48d
--- /dev/null
+++ b/app/src/main/res/drawable/on_off_btn_start_2_disabled.png
Binary files differ
diff --git a/app/src/main/res/drawable/on_off_btn_start_2_enabled.png b/app/src/main/res/drawable/on_off_btn_start_2_enabled.png
new file mode 100644
index 00000000..383e1076
--- /dev/null
+++ b/app/src/main/res/drawable/on_off_btn_start_2_enabled.png
Binary files differ
diff --git a/app/src/main/res/drawable/on_off_btn_start_2_no_shadow.png b/app/src/main/res/drawable/on_off_btn_start_2_no_shadow.png
new file mode 100644
index 00000000..941bdef1
--- /dev/null
+++ b/app/src/main/res/drawable/on_off_btn_start_2_no_shadow.png
Binary files differ
diff --git a/app/src/main/res/drawable/on_off_btn_start_2_pressed.png b/app/src/main/res/drawable/on_off_btn_start_2_pressed.png
new file mode 100644
index 00000000..7ff60cdb
--- /dev/null
+++ b/app/src/main/res/drawable/on_off_btn_start_2_pressed.png
Binary files differ
diff --git a/app/src/main/res/drawable/on_off_btn_start_animation1.png b/app/src/main/res/drawable/on_off_btn_start_animation1.png
new file mode 100644
index 00000000..f9d18488
--- /dev/null
+++ b/app/src/main/res/drawable/on_off_btn_start_animation1.png
Binary files differ
diff --git a/app/src/main/res/drawable/on_off_btn_start_animation2.png b/app/src/main/res/drawable/on_off_btn_start_animation2.png
new file mode 100644
index 00000000..33b600c9
--- /dev/null
+++ b/app/src/main/res/drawable/on_off_btn_start_animation2.png
Binary files differ
diff --git a/app/src/main/res/drawable/on_off_btn_start_animation3.png b/app/src/main/res/drawable/on_off_btn_start_animation3.png
new file mode 100644
index 00000000..2172107a
--- /dev/null
+++ b/app/src/main/res/drawable/on_off_btn_start_animation3.png
Binary files differ
diff --git a/app/src/main/res/drawable/on_off_btn_start_animation4.png b/app/src/main/res/drawable/on_off_btn_start_animation4.png
new file mode 100644
index 00000000..8b744462
--- /dev/null
+++ b/app/src/main/res/drawable/on_off_btn_start_animation4.png
Binary files differ
diff --git a/app/src/main/res/drawable/on_off_btn_start_animation5.png b/app/src/main/res/drawable/on_off_btn_start_animation5.png
new file mode 100644
index 00000000..11bb16cd
--- /dev/null
+++ b/app/src/main/res/drawable/on_off_btn_start_animation5.png
Binary files differ
diff --git a/app/src/main/res/layout-port/f_eip.xml b/app/src/main/res/layout-port/f_eip.xml
index 03401d16..a261c8ea 100644
--- a/app/src/main/res/layout-port/f_eip.xml
+++ b/app/src/main/res/layout-port/f_eip.xml
@@ -42,8 +42,8 @@
android:scaleType="fitXY"
app:srcCompat="@drawable/background_eip" />
- <se.leap.bitmaskclient.base.views.VpnStateImage
- android:id="@+id/vpn_state_image"
+ <se.leap.bitmaskclient.base.views.MainButton
+ android:id="@+id/main_button"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/stdpadding"
@@ -58,7 +58,7 @@
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_constraintTop_toBottomOf="@id/main_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/sub_description"
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 6a115a8b..839753e6 100644
--- a/app/src/main/res/layout-xlarge-port/f_eip.xml
+++ b/app/src/main/res/layout-xlarge-port/f_eip.xml
@@ -53,8 +53,8 @@
app:srcCompat="@drawable/background_eip" />
- <se.leap.bitmaskclient.base.views.VpnStateImage
- android:id="@+id/vpn_state_image"
+ <se.leap.bitmaskclient.base.views.MainButton
+ android:id="@+id/main_button"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/stdpadding"
@@ -69,7 +69,7 @@
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_constraintTop_toBottomOf="@id/main_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/sub_description"
diff --git a/app/src/main/res/layout-xlarge/f_eip.xml b/app/src/main/res/layout-xlarge/f_eip.xml
index 1ea7ba4b..34d74805 100644
--- a/app/src/main/res/layout-xlarge/f_eip.xml
+++ b/app/src/main/res/layout-xlarge/f_eip.xml
@@ -58,8 +58,8 @@
app:srcCompat="@drawable/background_eip" />
- <se.leap.bitmaskclient.base.views.VpnStateImage
- android:id="@+id/vpn_state_image"
+ <se.leap.bitmaskclient.base.views.MainButton
+ android:id="@+id/main_button"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/stdpadding"
diff --git a/app/src/main/res/layout/f_eip.xml b/app/src/main/res/layout/f_eip.xml
index e3e8fe0a..b5af785d 100644
--- a/app/src/main/res/layout/f_eip.xml
+++ b/app/src/main/res/layout/f_eip.xml
@@ -71,8 +71,8 @@
app:srcCompat="@drawable/background_eip" />
- <se.leap.bitmaskclient.base.views.VpnStateImage
- android:id="@+id/vpn_state_image"
+ <se.leap.bitmaskclient.base.views.MainButton
+ android:id="@+id/main_button"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/stdpadding"
diff --git a/app/src/main/res/layout/v_main_btn.xml b/app/src/main/res/layout/v_main_btn.xml
new file mode 100644
index 00000000..cf2a3e33
--- /dev/null
+++ b/app/src/main/res/layout/v_main_btn.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/vpn_btn_container"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools">
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/vpn_btn_glow"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@drawable/main_btn_glow"
+ tools:visibility="visible"
+ android:visibility="gone"
+ android:backgroundTint="@color/colorSecondary"
+ />
+
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/vpn_btn_shadow_dark"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:srcCompat="@drawable/on_off_btn_start_2_enabled"
+ android:visibility="visible"
+ />
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/vpn_btn_shadow_light"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ tools:visibility="gone"
+ android:visibility="gone"
+ />
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/vpn_btn_fill"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:srcCompat="@drawable/on_off_btn_start_2_no_shadow"
+ android:visibility="visible"
+ android:tint="@color/colorPrimaryDark"
+ />
+
+ <androidx.appcompat.widget.AppCompatImageView
+ android:id="@+id/vpn_btn_fill_overlay"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:srcCompat="@drawable/on_off_btn_fill"
+ tools:visibility="visible"
+ />
+</RelativeLayout> \ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 86ac1128..4b77decb 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -7,6 +7,7 @@
<color name="colorError">#ef9a9a</color>
<color name="colorSuccess">#a5d6a7</color>
<color name="colorDisabled">#AAAAAA</color>
+ <color name="colorSecondary">#03DAC6</color>
<color name="black800">#424242</color>
<color name="black800_secondary">#3b3b3b</color>