diff options
author | cyberta <cyberta@riseup.net> | 2018-01-27 16:35:36 -0800 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2018-01-27 16:35:36 -0800 |
commit | 3bb2c2c219359a6016366c4d3533a5e2ef812ea9 (patch) | |
tree | c743e74b951d3104e32f7e8351f83f68207430b4 /app/src/main/res | |
parent | df8b1fcf1ecc55f15229935294a337c897960ff4 (diff) | |
parent | 0ad1b398e19a02dd725b253e15f6ded4d0cd641b (diff) |
Merge branch '8800_vpn_fragment' into '0.9.8'
new UI for EipFragment
See merge request leap/bitmask_android!29
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/black_circle.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/drawable/vpn_connected.xml | 20 | ||||
-rw-r--r-- | app/src/main/res/drawable/vpn_connecting.xml | 25 | ||||
-rw-r--r-- | app/src/main/res/drawable/vpn_disconnected.xml | 28 | ||||
-rw-r--r-- | app/src/main/res/layout/eip_service_fragment.xml | 178 | ||||
-rw-r--r-- | app/src/main/res/values-v21/styles.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/values/colors.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 1 | ||||
-rw-r--r-- | app/src/main/res/values/styles.xml | 7 |
9 files changed, 240 insertions, 38 deletions
diff --git a/app/src/main/res/drawable/black_circle.xml b/app/src/main/res/drawable/black_circle.xml new file mode 100644 index 00000000..533652d6 --- /dev/null +++ b/app/src/main/res/drawable/black_circle.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> +<item> + <shape android:shape="oval"> + <solid android:color="@color/black800"/> + <size android:width="250dp" android:height="250dp"/> + </shape> +</item> +</selector>
\ No newline at end of file diff --git a/app/src/main/res/drawable/vpn_connected.xml b/app/src/main/res/drawable/vpn_connected.xml new file mode 100644 index 00000000..ea4d61a2 --- /dev/null +++ b/app/src/main/res/drawable/vpn_connected.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" +android:width="48dp" +android:height="48dp" +android:viewportWidth="48" +android:viewportHeight="48"> + +<path + android:fillColor="#ffffff" + android:strokeWidth="1" + android:pathData="M 12.187013,12.3125 C 5.4647724,12.3125 0,17.760254 0,24.5 c 0,6.739746 +5.4647724,12.21875 12.187013,12.21875 5.305097,0 9.803352,-3.408824 +11.47013,-8.15625 l 8.509091,-0.09375 1.745454,-2.09375 1.153247,-0.03125 +1.828239,2.182795 1.234013,-0.03125 2.049436,-2.307795 1.122078,0 +1.714286,2.21875 2.836364,0 L 48,24.4375 l -2.774026,-4.09375 -21.6,0 C +21.928439,15.65398 17.450952,12.3125 12.187013,12.3125 z m -4.8311688,8.90625 c +1.8370556,0 3.3350648,1.50191 3.3350648,3.34375 0,1.84184 -1.4980092,3.3125 +-3.3350648,3.3125 -1.8370556,0 -3.335065,-1.47066 -3.335065,-3.3125 0,-1.84184 +1.4980094,-3.34375 3.335065,-3.34375 z" /> +</vector>
\ No newline at end of file diff --git a/app/src/main/res/drawable/vpn_connecting.xml b/app/src/main/res/drawable/vpn_connecting.xml new file mode 100644 index 00000000..16c079c4 --- /dev/null +++ b/app/src/main/res/drawable/vpn_connecting.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48dp" + android:height="48dp" + android:viewportWidth="48" + android:viewportHeight="48"> + + <path + android:fillColor="#ffffff" + android:strokeWidth="1" + android:pathData="M12.1875,12.3125 C5.46526,12.3125,0,17.7603,0,24.5 +C0,31.2397,5.46526,36.7188,12.1875,36.7188 +C17.4926,36.7188,21.9895,33.3099,23.6563,28.5625 L32.1563,28.4688 +L33.9063,26.375 L35.0625,26.3438 L36.9063,28.5313 L38.125,28.5 L40.1875,26.1875 +L41.3125,26.1875 L43,28.4063 L45.8438,28.4063 L48,24.4375 L45.2188,20.3438 +L23.625,20.3438 C21.9275,15.654,17.4514,12.3125,12.1875,12.3125 Z +M12.2188,15.6875 C17.0994,15.6875,21.0313,19.6506,21.0313,24.5313 +C21.0313,29.4119,17.0994,33.375,12.2188,33.375 +C7.33805,33.375,3.375,29.4119,3.375,24.5313 +C3.375,19.6506,7.33805,15.6875,12.2188,15.6875 Z" /> + <path + android:strokeColor="#ffffff" + android:strokeWidth="2.50000000000000000" + android:pathData="M12.178,17.8729 L12.1779,24.6356 L8.61859,28.1949" /> +</vector>
\ No newline at end of file diff --git a/app/src/main/res/drawable/vpn_disconnected.xml b/app/src/main/res/drawable/vpn_disconnected.xml new file mode 100644 index 00000000..d6cf067b --- /dev/null +++ b/app/src/main/res/drawable/vpn_disconnected.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48dp" + android:height="48dp" + android:viewportWidth="48" + android:viewportHeight="48"> + + <path + android:fillColor="#ffffff" + android:strokeWidth="1" + android:pathData="M13.9636,12.4377 L28.7376,28.5002 L32.1662,28.4689 L33.9117,26.3752 +L35.0649,26.3439 L36.9039,28.5314 L38.1195,28.5002 L40.1766,26.1877 +L41.2987,26.1877 L43.013,28.4064 L45.8494,28.4064 L48,24.4377 L45.226,20.344 +L23.626,20.344 C22.1234,16.1928,18.44,13.0938,13.9637,12.4378 Z M8.47792,12.9065 +C3.56807,14.4767,0,19.059,0,24.5002 C0,31.24,5.46477,36.719,12.187,36.719 +C17.2792,36.719,21.6241,33.5759,23.439,29.1253 L8.47792,12.9065 Z +M7.35584,21.219 C9.1929,21.219,10.6909,22.7209,10.6909,24.5628 +C10.6909,26.4046,9.19289,27.8753,7.35584,27.8753 +C5.51878,27.8753,4.02077,26.4046,4.02077,24.5628 +C4.02077,22.721,5.51878,21.219,7.35583,21.219 Z" /> + <group android:name="rotationGroup" + android:rotation="47.263656"> + <path + android:fillColor="#ffffff" + android:strokeWidth="1" + android:pathData="M9.50852,-4.62741 L57.4577,-4.62741 L57.4577,-0.305379 L9.50852,-0.305379 L9.50852,-4.62741 Z" /> + </group> +</vector>
\ No newline at end of file diff --git a/app/src/main/res/layout/eip_service_fragment.xml b/app/src/main/res/layout/eip_service_fragment.xml index cef01c18..aa7ba514 100644 --- a/app/src/main/res/layout/eip_service_fragment.xml +++ b/app/src/main/res/layout/eip_service_fragment.xml @@ -1,49 +1,151 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" +<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:id="@+id/relativeLayout" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="10dp"> + android:layout_height="match_parent"> + + <android.support.constraint.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_constraintRight_toRightOf="parent" + app:layout_constraintGuide_percent="0.3" + /> + + <android.support.constraint.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.3" + /> + + + <android.support.constraint.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" + /> + + <android.support.constraint.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.7" + /> + + <android.support.v7.widget.AppCompatImageView + android:id="@+id/background" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:scaleType="fitXY" + app:srcCompat="@drawable/ic_colorsquare" /> + <TextView android:id="@+id/eipLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerHorizontal="true" - android:layout_marginLeft="10dp" - android:layout_marginStart="10dp" - android:layout_marginTop="12dp" - android:layout_marginBottom="12dp" + 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:text="@string/eip_service_label" - android:textAppearance="?android:attr/textAppearanceMedium" /> + android:textAppearance="?android:attr/textAppearanceMedium" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + + <android.support.v7.widget.AppCompatImageView + android:id="@+id/cirle" + 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_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" /> - <LinearLayout + + <android.support.v7.widget.AppCompatButton + android:id="@+id/vpn_main_button" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="horizontal" - android:layout_below="@+id/eipLabel" - android:layout_centerInParent="true"> - - <Button - android:id="@+id/vpn_main_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textSize="12sp" - /> - - <se.leap.bitmaskclient.userstatus.FabButton - android:id="@+id/vpn_status_image" - android:layout_width="32dp" - android:layout_height="32dp" - android:layout_marginLeft="3dp" - android:layout_marginStart="3dp" - android:color="@android:color/holo_blue_dark" - android:layout_gravity="center" - android:visibility="visible" - android:indeterminate="true" - android:max="100" - fbb_autoStart="true" - fbb_progressColor="#ff170aff" - fbb_progressWidthRatio="0.1" - /> - </LinearLayout> -</RelativeLayout> + 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" + android:text="@string/vpn.button.turn.on" + style="@style/BitmaskButtonBlack" + /> + + <TextView + android:id="@+id/routed_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + 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:text="@string/vpn_securely_routed" + android:visibility="visible" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/eipLabel" /> + + <TextView + android:id="@+id/vpn_route" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/stdpadding" + android:layout_marginStart="@dimen/stdpadding" + android:layout_marginLeft="@dimen/stdpadding" + android:layout_marginRight="@dimen/stdpadding" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/routed_text" /> + +</android.support.constraint.ConstraintLayout> diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml index fa27ebe8..09c44fb2 100644 --- a/app/src/main/res/values-v21/styles.xml +++ b/app/src/main/res/values-v21/styles.xml @@ -26,4 +26,10 @@ <item name="android:colorAccent">@color/accent</item> </style> + <style name="BitmaskButtonBlack" parent="android:Widget.Button"> + <item name="android:textAllCaps">true</item> + <item name="android:backgroundTint">@color/black800</item> + <item name="android:textColor">@color/white</item> + </style> + </resources> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index a8a63e4b..53ead009 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -6,6 +6,8 @@ <color name="colorError">#ef9a9a</color> <color name="colorSuccess">#a5d6a7</color> + <color name="black800">#424242</color> + <color name="red200">#ef9a9a</color> <color name="pink200">#f48fb1</color> <color name="purple200">#ce93d8</color> @@ -23,4 +25,6 @@ <color name="orange200">#ffcc80</color> <color name="deepOrange200">#ffab91</color> + <color name="white">#ffffff</color> + </resources> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 96b79222..5205a628 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -80,6 +80,7 @@ <string name="vpn.button.turn.on">Turn on</string> <string name="vpn.button.turn.off">Turn off</string> <string name="vpn_button_turn_off_blocking">Stop blocking</string> + <string name="vpn_securely_routed">Your traffic is securely routed through:</string> <string name="bitmask_log">Bitmask Log</string> <string name="title_activity_main">Bitmask</string> <string name="log_fragment_title">Log</string> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index b4e81bc4..0f41ea86 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -64,4 +64,11 @@ <item name="android:textAllCaps">true</item> <item name="android:color">@color/colorPrimary</item> </style> + + <style name="BitmaskButtonBlack" parent="android:Widget.Button"> + <item name="android:textAllCaps">true</item> + <item name="android:background">@color/black800</item> + <item name="android:textColor">@color/white</item> + </style> + </resources>
\ No newline at end of file |