summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2018-02-18 13:24:07 +0100
committercyBerta <cyberta@riseup.net>2018-02-18 13:24:07 +0100
commitbe6b775a7fdb1b8c194bea75ae8f923d9c1b0349 (patch)
treec4c0b41bbe878187fb1344cb3978e097c620b8b4 /app/src/main/res
parent732e1f23d1e00f28ea5e64869737ba2c34e1791e (diff)
parentff319e7862b5b6e1592811aa8c6571c7b9a1631c (diff)
Merge branch 'mirror_0xacab_0.9.8' into #8797_certificate_expiration
* fix merge conflicts in: app/src/main/java/se/leap/bitmaskclient/EipFragment.java app/src/main/java/se/leap/bitmaskclient/eip/EIP.java app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/progressbar_circle.xml83
-rw-r--r--app/src/main/res/layout-xlarge/eip_service_fragment.xml33
-rw-r--r--app/src/main/res/layout/eip_service_fragment.xml45
-rw-r--r--app/src/main/res/layout/v_main_button.xml132
-rw-r--r--app/src/main/res/values/dimens.xml1
5 files changed, 230 insertions, 64 deletions
diff --git a/app/src/main/res/drawable/progressbar_circle.xml b/app/src/main/res/drawable/progressbar_circle.xml
new file mode 100644
index 00000000..6257e3af
--- /dev/null
+++ b/app/src/main/res/drawable/progressbar_circle.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:id="@+id/progress1">
+ <rotate
+ android:fromDegrees="-90"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:toDegrees="90">
+
+ <shape
+ android:shape="ring"
+ android:useLevel="true">
+ <gradient
+ android:endColor="#00c5e1a5"
+ android:centerColor="#c5e1a5"
+ android:startColor="#00ffe082"
+ android:type="sweep"
+ />
+ </shape>
+ </rotate>
+ </item>
+
+ <item android:id="@+id/progress2">
+ <rotate
+ android:fromDegrees="0"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:toDegrees="180">
+
+ <shape
+ android:shape="ring"
+ android:useLevel="true">
+ <gradient
+ android:endColor="#00ffcc80"
+ android:centerColor="#ffcc80"
+ android:startColor="#00ffcc80"
+ android:type="sweep"
+ />
+ </shape>
+ </rotate>
+ </item>
+
+ <item android:id="@+id/progress3">
+ <rotate
+ android:fromDegrees="90"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:toDegrees="270">
+ <shape
+ android:shape="ring"
+ android:useLevel="true">
+ <gradient
+ android:endColor="#00ce93d8"
+ android:centerColor="#ce93d8"
+ android:startColor="#00ce93d8"
+ android:type="sweep"
+ />
+ </shape>
+ </rotate>
+ </item>
+
+ <item android:id="@+id/progress4">
+ <rotate
+ android:fromDegrees="180"
+ android:pivotX="50%"
+ android:pivotY="50%"
+ android:toDegrees="0">
+ <shape
+ android:shape="ring"
+ android:useLevel="true">
+ <gradient
+ android:endColor="#0081d4fa"
+ android:centerColor="#81d4fa"
+ android:startColor="#0081d4fa"
+ android:type="sweep"
+ />
+ </shape>
+ </rotate>
+ </item>
+
+</layer-list> \ No newline at end of file
diff --git a/app/src/main/res/layout-xlarge/eip_service_fragment.xml b/app/src/main/res/layout-xlarge/eip_service_fragment.xml
index 497d2c0b..b7af5797 100644
--- a/app/src/main/res/layout-xlarge/eip_service_fragment.xml
+++ b/app/src/main/res/layout-xlarge/eip_service_fragment.xml
@@ -69,41 +69,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
-
- <android.support.v7.widget.AppCompatImageView
- android:id="@+id/cirle"
+ <se.leap.bitmaskclient.views.VpnStateImage
+ android:id="@+id/vpn_state_image"
android:layout_width="0dp"
android:layout_height="0dp"
- 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"
+ android:layout_margin="@dimen/stdpadding"
app:layout_constraintBottom_toTopOf="@+id/guideline_horizontal_bottom"
app:layout_constraintEnd_toStartOf="@+id/guideline_vertical_right"
- app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/guideline_vertical_left"
app:layout_constraintTop_toTopOf="@+id/guideline_horizontal_top"
- app:layout_constraintVertical_bias="0.0"
- app:srcCompat="@drawable/black_circle" />
-
- <android.support.v7.widget.AppCompatImageView
- android:id="@+id/key"
- android:layout_width="0dp"
- android:layout_height="0dp"
- 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/cirle"
- app:layout_constraintEnd_toEndOf="@+id/cirle"
- app:layout_constraintStart_toStartOf="@+id/cirle"
- app:layout_constraintTop_toTopOf="@+id/cirle"
- app:srcCompat="@drawable/vpn_connected" />
-
+ app:layout_constraintDimensionRatio="1:1" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/vpn_main_button"
diff --git a/app/src/main/res/layout/eip_service_fragment.xml b/app/src/main/res/layout/eip_service_fragment.xml
index 497d2c0b..814ec310 100644
--- a/app/src/main/res/layout/eip_service_fragment.xml
+++ b/app/src/main/res/layout/eip_service_fragment.xml
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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"
- >
+ android:id="@+id/eipServiceFragment">
<android.support.constraint.Guideline
android:id="@+id/guideline_horizontal_top"
@@ -14,7 +12,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.225"
/>
<android.support.constraint.Guideline
@@ -23,7 +21,7 @@
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintGuide_percent="0.3"
+ app:layout_constraintGuide_percent="0.225"
/>
@@ -34,7 +32,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.775"
/>
<android.support.constraint.Guideline
@@ -43,7 +41,7 @@
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintGuide_percent="0.7"
+ app:layout_constraintGuide_percent="0.775"
/>
<android.support.v7.widget.AppCompatImageView
@@ -70,40 +68,17 @@
app:layout_constraintTop_toTopOf="parent" />
- <android.support.v7.widget.AppCompatImageView
- android:id="@+id/cirle"
+ <se.leap.bitmaskclient.views.VpnStateImage
+ android:id="@+id/vpn_state_image"
android:layout_width="0dp"
android:layout_height="0dp"
- 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"
+ android:layout_margin="@dimen/stdpadding"
app:layout_constraintBottom_toTopOf="@+id/guideline_horizontal_bottom"
app:layout_constraintEnd_toStartOf="@+id/guideline_vertical_right"
- app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/guideline_vertical_left"
app:layout_constraintTop_toTopOf="@+id/guideline_horizontal_top"
- app:layout_constraintVertical_bias="0.0"
- app:srcCompat="@drawable/black_circle" />
-
- <android.support.v7.widget.AppCompatImageView
- android:id="@+id/key"
- android:layout_width="0dp"
- android:layout_height="0dp"
- 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/cirle"
- app:layout_constraintEnd_toEndOf="@+id/cirle"
- app:layout_constraintStart_toStartOf="@+id/cirle"
- app:layout_constraintTop_toTopOf="@+id/cirle"
- app:srcCompat="@drawable/vpn_connected" />
-
+ app:layout_constraintDimensionRatio="1:1"
+ />
<android.support.v7.widget.AppCompatButton
android:id="@+id/vpn_main_button"
diff --git a/app/src/main/res/layout/v_main_button.xml b/app/src/main/res/layout/v_main_button.xml
new file mode 100644
index 00000000..ad1ac4ba
--- /dev/null
+++ b/app/src/main/res/layout/v_main_button.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+
+
+ <android.support.constraint.Guideline
+ android:id="@+id/vpn_btn_guideline_left"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ app:layout_constraintGuide_percent="0.125" />
+
+ <android.support.constraint.Guideline
+ android:id="@+id/vpn_btn_guideline_right"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ app:layout_constraintGuide_percent="0.875" />
+
+ <android.support.constraint.Guideline
+ android:id="@+id/vpn_btn_guideline_top"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ app:layout_constraintGuide_percent="0.125" />
+
+ <android.support.constraint.Guideline
+ android:id="@+id/vpn_btn_guideline_bottom"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ app:layout_constraintGuide_percent="0.875" />
+
+
+ <android.support.constraint.Guideline
+ android:id="@+id/icn_guideline_left"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ app:layout_constraintGuide_percent="0.2" />
+
+ <android.support.constraint.Guideline
+ android:id="@+id/icn_guideline_right"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ app:layout_constraintGuide_percent="0.8" />
+
+ <android.support.constraint.Guideline
+ android:id="@+id/icn_guideline_top"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ app:layout_constraintGuide_percent="0.2" />
+
+ <android.support.constraint.Guideline
+ android:id="@+id/icn_guideline_bottom"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ app:layout_constraintGuide_percent="0.8" />
+
+ <android.support.constraint.Guideline
+ android:id="@+id/border_guideline_left"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ app:layout_constraintGuide_percent="0.025" />
+
+ <android.support.constraint.Guideline
+ android:id="@+id/border_guideline_right"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ app:layout_constraintGuide_percent="0.975" />
+
+ <android.support.constraint.Guideline
+ android:id="@+id/border_guideline_top"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ app:layout_constraintGuide_percent="0.025" />
+
+ <android.support.constraint.Guideline
+ android:id="@+id/border_guideline_bottom"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ app:layout_constraintGuide_percent="0.975" />
+
+
+ <ProgressBar
+ android:id="@+id/progressBar"
+ style="@style/Widget.AppCompat.ProgressBar.Horizontal"
+
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ app:layout_constraintBottom_toBottomOf="@id/border_guideline_bottom"
+ app:layout_constraintEnd_toEndOf="@id/border_guideline_right"
+ app:layout_constraintStart_toStartOf="@id/border_guideline_left"
+ app:layout_constraintTop_toTopOf="@id/border_guideline_top"
+ android:indeterminate="true"
+ android:indeterminateDuration="2000"
+ android:indeterminateDrawable="@drawable/progressbar_circle"
+ android:interpolator="@android:anim/accelerate_decelerate_interpolator"
+ android:indeterminateBehavior="cycle"
+ />
+
+ <android.support.v7.widget.AppCompatImageView
+ android:id="@+id/circle"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ app:layout_constraintBottom_toTopOf="@+id/vpn_btn_guideline_bottom"
+ 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:srcCompat="@drawable/black_circle" />
+
+ <android.support.v7.widget.AppCompatImageView
+ android:id="@+id/vpn_state_key"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ 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:srcCompat="@drawable/vpn_connected" />
+
+</android.support.constraint.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 87d8e266..f160487b 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -7,6 +7,7 @@
<dimen name="paddingItemsSidebarLog">20dp</dimen>
<dimen name="stdpadding">8dp</dimen>
<dimen name="standard_margin">8dp</dimen>
+ <dimen name="mainbutton_padding">20dp</dimen>
<bool name="logSildersAlwaysVisible">false</bool>
<dimen name="diameter">48dp</dimen>