diff options
author | cyBerta <cyberta@riseup.net> | 2021-11-25 01:54:18 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-11-25 01:54:18 +0100 |
commit | 6fb2050aaf6e992bf96d41c5f6b19f5c1a3771c3 (patch) | |
tree | e74b21e0b9e24b5b8774598142b343aa56a7070c /app/src/main/res | |
parent | f78eeced2a24d869e514330467395b0471fb2adc (diff) |
implement separate settings fragment
Diffstat (limited to 'app/src/main/res')
15 files changed, 117 insertions, 66 deletions
diff --git a/app/src/main/res/drawable-hdpi/ic_cog.png b/app/src/main/res/drawable-hdpi/ic_cog.png Binary files differnew file mode 100644 index 00000000..24144015 --- /dev/null +++ b/app/src/main/res/drawable-hdpi/ic_cog.png diff --git a/app/src/main/res/drawable-hdpi/ic_snowflake.png b/app/src/main/res/drawable-hdpi/ic_snowflake.png Binary files differnew file mode 100644 index 00000000..2ff8a623 --- /dev/null +++ b/app/src/main/res/drawable-hdpi/ic_snowflake.png diff --git a/app/src/main/res/drawable-ldpi/ic_cog.png b/app/src/main/res/drawable-ldpi/ic_cog.png Binary files differnew file mode 100644 index 00000000..bbefe9dc --- /dev/null +++ b/app/src/main/res/drawable-ldpi/ic_cog.png diff --git a/app/src/main/res/drawable-ldpi/ic_snowflake.png b/app/src/main/res/drawable-ldpi/ic_snowflake.png Binary files differnew file mode 100644 index 00000000..eee0f0ab --- /dev/null +++ b/app/src/main/res/drawable-ldpi/ic_snowflake.png diff --git a/app/src/main/res/drawable-mdpi/ic_cog.png b/app/src/main/res/drawable-mdpi/ic_cog.png Binary files differnew file mode 100644 index 00000000..32022e2d --- /dev/null +++ b/app/src/main/res/drawable-mdpi/ic_cog.png diff --git a/app/src/main/res/drawable-mdpi/ic_snowflake.png b/app/src/main/res/drawable-mdpi/ic_snowflake.png Binary files differnew file mode 100644 index 00000000..6047bc1c --- /dev/null +++ b/app/src/main/res/drawable-mdpi/ic_snowflake.png diff --git a/app/src/main/res/drawable-xhdpi/ic_cog.png b/app/src/main/res/drawable-xhdpi/ic_cog.png Binary files differnew file mode 100644 index 00000000..43d6e8f6 --- /dev/null +++ b/app/src/main/res/drawable-xhdpi/ic_cog.png diff --git a/app/src/main/res/drawable-xhdpi/ic_snowflake.png b/app/src/main/res/drawable-xhdpi/ic_snowflake.png Binary files differnew file mode 100644 index 00000000..f71509c4 --- /dev/null +++ b/app/src/main/res/drawable-xhdpi/ic_snowflake.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_cog.png b/app/src/main/res/drawable-xxhdpi/ic_cog.png Binary files differnew file mode 100644 index 00000000..947874ed --- /dev/null +++ b/app/src/main/res/drawable-xxhdpi/ic_cog.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_snowflake.png b/app/src/main/res/drawable-xxhdpi/ic_snowflake.png Binary files differnew file mode 100644 index 00000000..8fb1b339 --- /dev/null +++ b/app/src/main/res/drawable-xxhdpi/ic_snowflake.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_cog.png b/app/src/main/res/drawable-xxxhdpi/ic_cog.png Binary files differnew file mode 100644 index 00000000..60f92966 --- /dev/null +++ b/app/src/main/res/drawable-xxxhdpi/ic_cog.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_snowflake.png b/app/src/main/res/drawable-xxxhdpi/ic_snowflake.png Binary files differnew file mode 100644 index 00000000..577f675c --- /dev/null +++ b/app/src/main/res/drawable-xxxhdpi/ic_snowflake.png diff --git a/app/src/main/res/layout/f_drawer_main.xml b/app/src/main/res/layout/f_drawer_main.xml index 65179857..bd7e66ae 100644 --- a/app/src/main/res/layout/f_drawer_main.xml +++ b/app/src/main/res/layout/f_drawer_main.xml @@ -50,13 +50,12 @@ app:text="@string/switch_provider_menu_option" app:icon="@drawable/ic_switch_provider_36" android:visibility="gone" + tools:visibility="visible" /> <View android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" - android:minHeight="20dp" + android:layout_height="20dp" android:background="@color/black800_high_transparent" /> @@ -69,35 +68,6 @@ app:icon="@drawable/ic_battery_36" /> - <se.leap.bitmaskclient.base.views.IconSwitchEntry - android:id="@+id/bridges_switch" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - app:text="@string/nav_drawer_obfuscated_connection" - app:subtitle="@string/nav_drawer_subtitle_obfuscated_connection" - app:icon="@drawable/ic_bridge_36" - android:visibility="gone" - /> - - <se.leap.bitmaskclient.base.views.IconTextEntry - android:id="@+id/always_on_vpn" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - app:text="@string/always_on_vpn" - app:subtitle="@string/subtitle_always_on_vpn" - app:icon="@drawable/ic_always_on_36" - android:visibility="gone" - /> - - <se.leap.bitmaskclient.base.views.IconTextEntry - android:id="@+id/exclude_apps" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - app:text="@string/exclude_apps_fragment_title" - app:icon="@drawable/ic_shield_remove_grey600_36dp" - android:visibility="gone" - /> - <se.leap.bitmaskclient.base.views.IconTextEntry android:id="@+id/manualGatewaySelection" app:text="@string/gateway_selection_title" @@ -105,50 +75,21 @@ app:icon="@drawable/ic_web" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:visibility="gone" - /> - - <androidx.appcompat.widget.AppCompatTextView - android:id="@+id/show_experimental_features" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/show_experimental" - android:textColor="@color/colorPrimaryDark" - android:paddingTop="6dp" - android:paddingBottom="6dp" - android:gravity="center" - android:background="@color/black800_high_transparent" - /> - - <se.leap.bitmaskclient.base.views.IconSwitchEntry - android:id="@+id/enableIPv6Firewall" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - app:text="@string/ipv6Firewall" - app:subtitle="@string/require_root" - app:icon="@drawable/ic_cancel" - android:visibility="gone" - tools:visibility="visible" + android:visibility="visible" /> <se.leap.bitmaskclient.base.views.IconTextEntry - android:id="@+id/tethering" - android:layout_width="wrap_content" + android:id="@+id/advancedSettings" + app:icon="@drawable/ic_cog" android:layout_height="wrap_content" - app:text="@string/tethering" - app:subtitle="@string/require_root" - app:icon="@drawable/ic_access_point_36" - android:visibility="gone" - tools:visibility="visible" + android:layout_width="wrap_content" + app:text="@string/advanced_settings" /> <View - android:id="@+id/experimental_features_footer" android:layout_width="match_parent" android:layout_height="20dp" android:background="@color/black800_high_transparent" - android:visibility="gone" - tools:visibility="visible" /> <se.leap.bitmaskclient.base.views.IconTextEntry diff --git a/app/src/main/res/layout/f_settings.xml b/app/src/main/res/layout/f_settings.xml new file mode 100644 index 00000000..6e0e2eb2 --- /dev/null +++ b/app/src/main/res/layout/f_settings.xml @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="@dimen/stdpadding" + > + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/general_header" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.AppCompat.Title" + android:text="@string/vpn_settings" + android:paddingTop="@dimen/activity_margin" + /> + + <se.leap.bitmaskclient.base.views.IconTextEntry + android:id="@+id/always_on_vpn" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:text="@string/always_on_vpn" + app:subtitle="@string/subtitle_always_on_vpn" + app:icon="@drawable/ic_always_on_36" + android:visibility="visible" + /> + + <se.leap.bitmaskclient.base.views.IconTextEntry + android:id="@+id/exclude_apps" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:text="@string/exclude_apps_fragment_title" + app:icon="@drawable/ic_shield_remove_grey600_36dp" + android:visibility="visible" + /> + + <!-- <se.leap.bitmaskclient.base.views.IconSwitchEntry + android:id="@+id/prefer_udp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:text="@string/prefer_udp" + app:subtitle="@string/prefer_udp_subtitle" + app:icon="@drawable/ic_multiple_stop" + app:singleLine="false" + /> + --> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/circumvention_header" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.AppCompat.Title" + android:text="@string/censorship_circumvention" + android:paddingTop="@dimen/activity_margin" + /> + <se.leap.bitmaskclient.base.views.IconSwitchEntry + android:id="@+id/bridges_switch" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:text="@string/nav_drawer_obfuscated_connection" + app:subtitle="@string/nav_drawer_subtitle_obfuscated_connection" + app:icon="@drawable/ic_bridge_36" + app:singleLine="false" + /> + + <se.leap.bitmaskclient.base.views.IconSwitchEntry + android:id="@+id/use_snowflake" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:icon="@drawable/ic_snowflake" + app:text="@string/use_snowflake" + app:subtitle="@string/snowflake_description" + app:singleLine="false" + /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/experimental_header" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.AppCompat.Title" + android:text="@string/experimental_features" + android:paddingTop="@dimen/activity_margin" + /> + + + <se.leap.bitmaskclient.base.views.IconSwitchEntry + android:id="@+id/enableIPv6Firewall" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:text="@string/ipv6Firewall" + app:subtitle="@string/require_root" + app:icon="@drawable/ic_cancel" + /> + + <se.leap.bitmaskclient.base.views.IconTextEntry + android:id="@+id/tethering" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:text="@string/tethering" + app:subtitle="@string/require_root" + app:icon="@drawable/ic_access_point_36" + /> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9d62cc3b..c49a456e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -112,6 +112,7 @@ <string name="require_root">Requires root permissions</string> <string name="show_experimental">Show experimental features</string> <string name="hide_experimental">Hide experimental features</string> + <string name="experimental_features">Experimental features</string> <string name="tethering_enabled_message">Please make sure to enable tethering in the <![CDATA[<b>system settings</b>]]> first.</string> <string name="tethering_message">Share your VPN with other devices via:</string> <string name="tethering_wifi">Wi-Fi hotspot</string> @@ -183,5 +184,9 @@ <string name="retry_unobfuscated">Retry unobfuscated</string> <string name="hide_connection_details">Hide connection details</string> <string name="error_network_connection">%s has no internet connection. Please check your WiFi and cellular data settings.</string> + <string name="censorship_circumvention">Censorship circumvention</string> + <string name="use_snowflake">Use Snowflake</string> + <string name="snowflake_description">Circumvent blocking of the provider\'s configuration server.</string> + <string name="vpn_settings">VPN settings</string> </resources> |