diff options
author | cyberta <cyberta@riseup.net> | 2022-11-29 00:58:36 +0100 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2022-11-30 14:19:39 +0100 |
commit | 0cf31d76c9f48cc73446b3fde478a46cd29c7594 (patch) | |
tree | 960fc28ddc55841e137431c3583a85a868eedca5 /app/src/main/res | |
parent | 86619a6ebb4508cd75584f12db69b2c1ed22ef2d (diff) |
split EipFragment and MainButon into normal and custom flavor, implement new on-off button design for Bitmask
Diffstat (limited to 'app/src/main/res')
21 files changed, 336 insertions, 136 deletions
diff --git a/app/src/main/res/drawable-hdpi/ic_btn_cancel.png b/app/src/main/res/drawable-hdpi/ic_btn_cancel.png Binary files differnew file mode 100644 index 00000000..00feedcd --- /dev/null +++ b/app/src/main/res/drawable-hdpi/ic_btn_cancel.png diff --git a/app/src/main/res/drawable-hdpi/ic_btn_on.png b/app/src/main/res/drawable-hdpi/ic_btn_on.png Binary files differnew file mode 100644 index 00000000..2b37d25e --- /dev/null +++ b/app/src/main/res/drawable-hdpi/ic_btn_on.png diff --git a/app/src/main/res/drawable-xhdpi/ic_btn_cancel.png b/app/src/main/res/drawable-xhdpi/ic_btn_cancel.png Binary files differnew file mode 100644 index 00000000..d623f8f5 --- /dev/null +++ b/app/src/main/res/drawable-xhdpi/ic_btn_cancel.png diff --git a/app/src/main/res/drawable-xhdpi/ic_btn_on.png b/app/src/main/res/drawable-xhdpi/ic_btn_on.png Binary files differnew file mode 100644 index 00000000..4fdc9464 --- /dev/null +++ b/app/src/main/res/drawable-xhdpi/ic_btn_on.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_btn_cancel.png b/app/src/main/res/drawable-xxhdpi/ic_btn_cancel.png Binary files differnew file mode 100644 index 00000000..af604d9b --- /dev/null +++ b/app/src/main/res/drawable-xxhdpi/ic_btn_cancel.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_btn_on.png b/app/src/main/res/drawable-xxhdpi/ic_btn_on.png Binary files differnew file mode 100644 index 00000000..d6cfc10b --- /dev/null +++ b/app/src/main/res/drawable-xxhdpi/ic_btn_on.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_btn_cancel.png b/app/src/main/res/drawable-xxxhdpi/ic_btn_cancel.png Binary files differnew file mode 100644 index 00000000..6c17bd78 --- /dev/null +++ b/app/src/main/res/drawable-xxxhdpi/ic_btn_cancel.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_btn_on.png b/app/src/main/res/drawable-xxxhdpi/ic_btn_on.png Binary files differnew file mode 100644 index 00000000..b0e54b8c --- /dev/null +++ b/app/src/main/res/drawable-xxxhdpi/ic_btn_on.png diff --git a/app/src/main/res/drawable/button_circle_cancel.xml b/app/src/main/res/drawable/button_circle_cancel.xml new file mode 100644 index 00000000..1d94abca --- /dev/null +++ b/app/src/main/res/drawable/button_circle_cancel.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/button_circle_cancel_pressed" android:state_pressed="true"/> + <item android:drawable="@drawable/button_circle_cancel_released"/> +</selector>
\ No newline at end of file diff --git a/app/src/main/res/drawable/button_circle_cancel_pressed.xml b/app/src/main/res/drawable/button_circle_cancel_pressed.xml new file mode 100644 index 00000000..13970e9f --- /dev/null +++ b/app/src/main/res/drawable/button_circle_cancel_pressed.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- <item> + <shape android:shape="rectangle"> + <solid android:color="@color/white"/> + <size android:width="250dp" android:height="250dp"/> + </shape> + </item> --> + <item + android:left="-23dp" + android:right="-23dp" + android:top="-8dp" + android:bottom="-8dp" + > + <animated-rotate + android:drawable="@drawable/rainbow_circle" + android:pivotX="50.0%" + android:pivotY="50.0%" + android:fromDegrees="0.0" + android:toDegrees="360.0" + > + </animated-rotate> + </item> + <item + android:top="18dp" + android:bottom="12dp" + > + <shape android:shape="oval"> + <solid android:color="@color/btn_yellow_dark"/> + <size android:width="250dp" android:height="250dp" /> + </shape> + </item> + <item + android:top="18dp" + android:bottom="12dp" + > + <shape + android:shape="ring" + android:innerRadius="125dp" + android:useLevel="false" + android:thickness="3dp"> + <gradient + android:type="radial" + android:gradientRadius="125dp" + android:centerX="0.50" + android:centerY="0.54" + android:startColor="#000000" + android:centerColor="#000000" + android:endColor="@color/transparent" /> + + </shape> + </item> + <item + android:top="68dp" + android:bottom="62dp" + android:left="50dp" + android:right="50dp" + > + <bitmap android:src="@drawable/ic_btn_cancel" + /> + </item> + + +</layer-list>
\ No newline at end of file diff --git a/app/src/main/res/drawable/button_circle_cancel_released.xml b/app/src/main/res/drawable/button_circle_cancel_released.xml new file mode 100644 index 00000000..2e7bc4b7 --- /dev/null +++ b/app/src/main/res/drawable/button_circle_cancel_released.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- <item> + <shape android:shape="rectangle"> + <solid android:color="@color/white"/> + <size android:width="250dp" android:height="250dp"/> + </shape> + </item>--> + + <item + android:left="-23dp" + android:right="-23dp" + android:top="-8dp" + android:bottom="-8dp" + > + <animated-rotate + android:drawable="@drawable/rainbow_circle" + android:pivotX="50.0%" + android:pivotY="50.0%" + android:fromDegrees="0.0" + android:toDegrees="360.0" + > + </animated-rotate> + </item> + <item + android:bottom="15dp" + android:top="15dp" + > + <shape android:shape="oval"> + <solid android:color="@color/btn_yellow"/> + <size android:width="250dp" android:height="250dp" /> + </shape> + </item> + <item + android:bottom="15dp" + android:top="15dp" + > + <shape + android:shape="ring" + android:innerRadius="125dp" + android:useLevel="false" + android:thickness="10dp"> + <gradient + android:type="radial" + android:gradientRadius="125dp" + android:centerX="0.51" + android:centerY="0.54" + android:startColor="#000000" + android:centerColor="#000000" + android:endColor="@color/transparent" /> + + </shape> + </item> + <item + android:top="65dp" + android:bottom="65dp" + android:left="50dp" + android:right="50dp" + > + <bitmap android:src="@drawable/ic_btn_cancel" /> + </item> +</layer-list>
\ No newline at end of file diff --git a/app/src/main/res/drawable/button_circle_start.xml b/app/src/main/res/drawable/button_circle_start.xml new file mode 100644 index 00000000..6d8482f4 --- /dev/null +++ b/app/src/main/res/drawable/button_circle_start.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/button_circle_start_pressed" android:state_pressed="true"> + </item> + <item android:drawable="@drawable/button_circle_start_released"> + </item> +</selector>
\ No newline at end of file diff --git a/app/src/main/res/drawable/button_circle_start_pressed.xml b/app/src/main/res/drawable/button_circle_start_pressed.xml new file mode 100644 index 00000000..ce8eb8e1 --- /dev/null +++ b/app/src/main/res/drawable/button_circle_start_pressed.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <!--<item> + <shape android:shape="rectangle"> + <solid android:color="@color/white"/> + <size android:width="250dp" android:height="250dp"/> + </shape> + </item>--> + <item + android:top="18dp" + android:bottom="12dp" + > + <shape android:shape="oval"> + <solid android:color="@color/btn_red_dark"/> + <size android:width="250dp" android:height="250dp" /> + </shape> + </item> + <item + android:top="18dp" + android:bottom="12dp" + > + <shape + android:shape="ring" + android:innerRadius="125dp" + android:useLevel="false" + android:thickness="3dp"> + <gradient + android:type="radial" + android:gradientRadius="125dp" + android:centerX="0.50" + android:centerY="0.54" + android:startColor="#000000" + android:centerColor="#000000" + android:endColor="@color/transparent" /> + + </shape> + </item> + <item + android:top="68dp" + android:bottom="62dp" + android:left="50dp" + android:right="50dp" + > + <bitmap android:src="@drawable/ic_btn_on" + /> + </item> +</layer-list>
\ No newline at end of file diff --git a/app/src/main/res/drawable/button_circle_start_released.xml b/app/src/main/res/drawable/button_circle_start_released.xml new file mode 100644 index 00000000..ce1ba997 --- /dev/null +++ b/app/src/main/res/drawable/button_circle_start_released.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <!--<item> + <shape android:shape="rectangle"> + <solid android:color="@color/white"/> + <size android:width="250dp" android:height="250dp"/> + </shape> + </item>--> + <item + android:bottom="15dp" + android:top="15dp" + > + <shape android:shape="oval"> + <solid android:color="@color/btn_red"/> + <size android:width="250dp" android:height="250dp" /> + </shape> + </item> + <item + android:bottom="15dp" + android:top="15dp" + > + <shape + android:shape="ring" + android:innerRadius="125dp" + android:useLevel="false" + android:thickness="10dp"> + <gradient + android:type="radial" + android:gradientRadius="125dp" + android:centerX="0.51" + android:centerY="0.54" + android:startColor="#000000" + android:centerColor="#000000" + android:endColor="@color/transparent" /> + + </shape> + </item> + <item + android:top="65dp" + android:bottom="65dp" + android:left="50dp" + android:right="50dp" + > + <bitmap android:src="@drawable/ic_btn_on" /> + </item> +</layer-list>
\ No newline at end of file diff --git a/app/src/main/res/drawable/button_circle_stop.xml b/app/src/main/res/drawable/button_circle_stop.xml new file mode 100644 index 00000000..674cbf15 --- /dev/null +++ b/app/src/main/res/drawable/button_circle_stop.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/button_circle_stop_pressed" android:state_pressed="true"/> + <item android:drawable="@drawable/button_circle_stop_released"/> +</selector>
\ No newline at end of file diff --git a/app/src/main/res/drawable/button_circle_stop_pressed.xml b/app/src/main/res/drawable/button_circle_stop_pressed.xml new file mode 100644 index 00000000..0561455a --- /dev/null +++ b/app/src/main/res/drawable/button_circle_stop_pressed.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <!--<item> + <shape android:shape="rectangle"> + <solid android:color="@color/white"/> + <size android:width="250dp" android:height="250dp"/> + </shape> + </item>--> + <item + android:top="18dp" + android:bottom="12dp" + > + <shape android:shape="oval"> + <solid android:color="@color/btn_green_dark"/> + <size android:width="250dp" android:height="250dp" /> + </shape> + </item> + <item + android:top="18dp" + android:bottom="12dp" + > + <shape + android:shape="ring" + android:innerRadius="125dp" + android:useLevel="false" + android:thickness="3dp"> + <gradient + android:type="radial" + android:gradientRadius="125dp" + android:centerX="0.51" + android:centerY="0.54" + android:startColor="#000000" + android:centerColor="#000000" + android:endColor="@color/transparent" /> + + </shape> + </item> + <item + android:top="68dp" + android:bottom="62dp" + android:left="50dp" + android:right="50dp" + > + <bitmap android:src="@drawable/ic_btn_cancel" + /> + </item> +</layer-list>
\ No newline at end of file diff --git a/app/src/main/res/drawable/button_circle_stop_released.xml b/app/src/main/res/drawable/button_circle_stop_released.xml new file mode 100644 index 00000000..2e168c2d --- /dev/null +++ b/app/src/main/res/drawable/button_circle_stop_released.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <!--<item> + <shape android:shape="rectangle"> + <solid android:color="@color/white"/> + <size android:width="250dp" android:height="250dp"/> + </shape> + </item>--> + <item + android:bottom="15dp" + android:top="15dp" + > + <shape android:shape="oval"> + <solid android:color="@color/btn_green"/> + <size android:width="250dp" android:height="250dp" /> + </shape> + </item> + <item + android:bottom="15dp" + android:top="15dp" + > + <shape + android:shape="ring" + android:innerRadius="125dp" + android:useLevel="false" + android:thickness="10dp"> + <gradient + android:type="radial" + android:gradientRadius="125dp" + android:centerX="0.51" + android:centerY="0.54" + android:startColor="#000000" + android:centerColor="#000000" + android:endColor="@color/transparent" /> + + </shape> + </item> + <item + android:top="65dp" + android:bottom="65dp" + android:left="50dp" + android:right="50dp" + > + <bitmap android:src="@drawable/ic_btn_cancel" /> + </item> +</layer-list>
\ No newline at end of file diff --git a/app/src/main/res/drawable/ic_btn_cancel.png b/app/src/main/res/drawable/ic_btn_cancel.png Binary files differnew file mode 100644 index 00000000..0b55460a --- /dev/null +++ b/app/src/main/res/drawable/ic_btn_cancel.png diff --git a/app/src/main/res/drawable/ic_btn_on.png b/app/src/main/res/drawable/ic_btn_on.png Binary files differnew file mode 100644 index 00000000..be160a33 --- /dev/null +++ b/app/src/main/res/drawable/ic_btn_on.png diff --git a/app/src/main/res/layout/v_main_button.xml b/app/src/main/res/layout/v_main_button.xml deleted file mode 100644 index 741fc88f..00000000 --- a/app/src/main/res/layout/v_main_button.xml +++ /dev/null @@ -1,136 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.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"> - - - <androidx.constraintlayout.widget.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" /> - - <androidx.constraintlayout.widget.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" /> - - <androidx.constraintlayout.widget.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" /> - - <androidx.constraintlayout.widget.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" /> - - - <androidx.constraintlayout.widget.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" /> - - <androidx.constraintlayout.widget.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" /> - - <androidx.constraintlayout.widget.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" /> - - <androidx.constraintlayout.widget.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" /> - - <androidx.constraintlayout.widget.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" /> - - <androidx.constraintlayout.widget.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" /> - - <androidx.constraintlayout.widget.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" /> - - <androidx.constraintlayout.widget.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" - app:layout_constraintDimensionRatio="1:1" - android:indeterminate="true" - android:indeterminateDuration="800" - android:indeterminateDrawable="@drawable/progressbar_circle" - android:interpolator="@android:anim/decelerate_interpolator" - android:indeterminateBehavior="cycle" - /> - - <androidx.appcompat.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:layout_constraintDimensionRatio="1:1" - app:srcCompat="@drawable/black_circle" /> - - <androidx.appcompat.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:layout_constraintDimensionRatio="1:1" - app:layout_constraintVertical_bias="0.35" - app:srcCompat="@drawable/ic_btn_on_disabled" /> - -</androidx.constraintlayout.widget.ConstraintLayout>
\ 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 40b51436..dbc7326f 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -14,6 +14,7 @@ <color name="black800_secondary">#3b3b3b</color> <color name="black800_transparent">#AA424242</color> <color name="black800_high_transparent">#22424242</color> + <color name="transparent">#00000000</color> <color name="red200">#ef9a9a</color> <color name="pink200">#f48fb1</color> @@ -45,5 +46,11 @@ <color name="colorLocationButtonTint">@color/black800</color> <color name="colorLocationButtonTintTransparent">@color/black800_high_transparent</color> <color name="colorWarning">#B33A3A</color> + <color name="btn_red">#FF7D7D</color> + <color name="btn_red_dark">#c84c51</color> + <color name="btn_yellow">#FFBF00</color> + <color name="btn_yellow_dark">#C78F00</color> + <color name="btn_green">#9FC17F</color> + <color name="btn_green_dark">#709152</color> </resources> |