diff options
author | cyBerta <cyberta@riseup.net> | 2019-10-01 00:25:54 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2019-10-01 00:25:54 +0200 |
commit | fca6c9dcff1b5b5400a61b7411a7f72460fbfbfa (patch) | |
tree | c8efd8b964d495467619000fa7435c2a5527efa1 /app/src/main/res | |
parent | 7820e8c0819a10c5b4729678607681fcfe30cbae (diff) | |
parent | 685da193ea29f3e7a8a42d55747dfb2f956f23b6 (diff) |
Merge branch 'pluggableTransports2'
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable-hdpi/ic_bridge_36.png | bin | 0 -> 821 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-mdpi/ic_bridge_36.png | bin | 0 -> 774 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-xhdpi/ic_bridge_36.png | bin | 0 -> 1162 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-xxhdpi/ic_bridge_36.png | bin | 0 -> 1308 bytes | |||
-rw-r--r-- | app/src/main/res/drawable-xxxhdpi/ic_bridge_36.png | bin | 0 -> 1760 bytes | |||
-rw-r--r-- | app/src/main/res/layout-xlarge/v_icon_text_list_item.xml | 33 | ||||
-rw-r--r-- | app/src/main/res/layout-xlarge/v_switch_list_item.xml | 25 | ||||
-rw-r--r-- | app/src/main/res/layout/f_drawer_main.xml | 156 | ||||
-rw-r--r-- | app/src/main/res/layout/v_icon_text_list_item.xml | 33 | ||||
-rw-r--r-- | app/src/main/res/layout/v_switch_list_item.xml | 26 | ||||
-rw-r--r-- | app/src/main/res/values/attrs.xml | 16 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/values/themes.xml | 4 |
13 files changed, 246 insertions, 52 deletions
diff --git a/app/src/main/res/drawable-hdpi/ic_bridge_36.png b/app/src/main/res/drawable-hdpi/ic_bridge_36.png Binary files differnew file mode 100644 index 00000000..e3acd2d1 --- /dev/null +++ b/app/src/main/res/drawable-hdpi/ic_bridge_36.png diff --git a/app/src/main/res/drawable-mdpi/ic_bridge_36.png b/app/src/main/res/drawable-mdpi/ic_bridge_36.png Binary files differnew file mode 100644 index 00000000..6c45a2d8 --- /dev/null +++ b/app/src/main/res/drawable-mdpi/ic_bridge_36.png diff --git a/app/src/main/res/drawable-xhdpi/ic_bridge_36.png b/app/src/main/res/drawable-xhdpi/ic_bridge_36.png Binary files differnew file mode 100644 index 00000000..6f89408c --- /dev/null +++ b/app/src/main/res/drawable-xhdpi/ic_bridge_36.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_bridge_36.png b/app/src/main/res/drawable-xxhdpi/ic_bridge_36.png Binary files differnew file mode 100644 index 00000000..d00613b8 --- /dev/null +++ b/app/src/main/res/drawable-xxhdpi/ic_bridge_36.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_bridge_36.png b/app/src/main/res/drawable-xxxhdpi/ic_bridge_36.png Binary files differnew file mode 100644 index 00000000..8f531f5a --- /dev/null +++ b/app/src/main/res/drawable-xxxhdpi/ic_bridge_36.png diff --git a/app/src/main/res/layout-xlarge/v_icon_text_list_item.xml b/app/src/main/res/layout-xlarge/v_icon_text_list_item.xml index 0192e080..798b47e3 100644 --- a/app/src/main/res/layout-xlarge/v_icon_text_list_item.xml +++ b/app/src/main/res/layout-xlarge/v_icon_text_list_item.xml @@ -1,6 +1,6 @@ -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/item_container" - android:layout_height="wrap_content" + android:layout_height="?android:attr/listPreferredItemHeight" android:layout_width="match_parent" android:orientation="horizontal" xmlns:tools="http://schemas.android.com/tools"> @@ -27,6 +27,33 @@ android:paddingRight="?android:attr/listPreferredItemPaddingRight" android:minHeight="?android:attr/listPreferredItemHeight" tools:text="TEST" + android:layout_toEndOf="@id/material_icon" + android:layout_toRightOf="@+id/material_icon" + android:layout_above="@+id/subtitle" /> -</LinearLayout> + <TextView + android:id="@+id/subtitle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:layout_alignParentBottom="true" + android:textAppearance="?android:attr/textAppearanceSmall" + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingLeft="?android:attr/listPreferredItemPaddingLeft" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:paddingRight="?android:attr/listPreferredItemPaddingRight" + android:paddingBottom="8dp" + tools:text="TEST" + android:visibility="gone" + android:layout_toEndOf="@id/material_icon" + android:layout_toRightOf="@+id/material_icon" + /> + + <View + android:layout_width="match_parent" + android:layout_height="1px" + android:background="@android:color/darker_gray" + android:layout_alignParentBottom="true" + /> +</RelativeLayout> diff --git a/app/src/main/res/layout-xlarge/v_switch_list_item.xml b/app/src/main/res/layout-xlarge/v_switch_list_item.xml index d692070e..3d81af11 100644 --- a/app/src/main/res/layout-xlarge/v_switch_list_item.xml +++ b/app/src/main/res/layout-xlarge/v_switch_list_item.xml @@ -29,6 +29,25 @@ tools:text="TEST" android:layout_toEndOf="@id/material_icon" android:layout_toRightOf="@+id/material_icon" + android:layout_above="@+id/subtitle" + /> + + <TextView + android:id="@+id/subtitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:layout_alignParentBottom="true" + android:textAppearance="?android:attr/textAppearanceSmall" + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingLeft="?android:attr/listPreferredItemPaddingLeft" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:paddingRight="?android:attr/listPreferredItemPaddingRight" + android:paddingBottom="4dp" + tools:text="TEST" + android:visibility="gone" + android:layout_toEndOf="@id/material_icon" + android:layout_toRightOf="@+id/material_icon" /> <android.support.v7.widget.SwitchCompat @@ -45,4 +64,10 @@ android:minHeight="?android:attr/listPreferredItemHeight" android:checked="false" tools:text="" /> + <View + android:layout_width="match_parent" + android:layout_height="1px" + android:background="@android:color/darker_gray" + android:layout_alignParentBottom="true" + /> </RelativeLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/f_drawer_main.xml b/app/src/main/res/layout/f_drawer_main.xml index b04d7b87..f6c9b2bb 100644 --- a/app/src/main/res/layout/f_drawer_main.xml +++ b/app/src/main/res/layout/f_drawer_main.xml @@ -1,70 +1,134 @@ -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" - android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical" + android:layout_width="match_parent" android:background="@color/colorBackground" tools:context="se.leap.bitmaskclient.drawer.NavigationDrawerFragment" android:clickable="true" - android:focusable="true"> + android:focusable="true" + android:fillViewport="true" + > - <FrameLayout + <LinearLayout android:layout_width="match_parent" - android:layout_height="150dp"> + android:layout_height="wrap_content" + android:orientation="vertical" + > - <android.support.v7.widget.AppCompatImageView - android:id="@+id/background" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:adjustViewBounds="false" - android:cropToPadding="false" - android:scaleType="fitXY" - app:srcCompat="@drawable/background_drawer" /> - - <android.support.v7.widget.AppCompatImageView - android:id="@+id/foreground" + <FrameLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:scaleType="centerInside" - app:srcCompat="@drawable/drawer_logo" /> - </FrameLayout> - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> + android:layout_height="150dp"> - <ListView - android:id="@+id/accountList" - android:layout_width="match_parent" + <android.support.v7.widget.AppCompatImageView + android:id="@+id/background" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:adjustViewBounds="false" + android:cropToPadding="false" + android:scaleType="fitXY" + app:srcCompat="@drawable/background_drawer" /> + + <android.support.v7.widget.AppCompatImageView + android:id="@+id/foreground" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:scaleType="centerInside" + app:srcCompat="@drawable/drawer_logo" /> + </FrameLayout> + + <se.leap.bitmaskclient.views.IconTextEntry + android:id="@+id/account" android:layout_height="wrap_content" - android:isScrollContainer="false" + android:layout_width="wrap_content" + /> + + <se.leap.bitmaskclient.views.IconTextEntry + android:id="@+id/switch_provider" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + app:text="@string/switch_provider_menu_option" + app:icon="@drawable/ic_switch_provider_36" + android:visibility="gone" /> <View - android:id="@+id/divider" - android:layout_below="@id/accountList" android:layout_width="match_parent" - android:layout_height="1px" - android:background="@android:color/darker_gray" + android:layout_height="0dp" + android:layout_weight="1" + android:minHeight="20dp" + android:background="@color/black800_high_transparent" /> - <FrameLayout + <se.leap.bitmaskclient.views.IconSwitchEntry + android:id="@+id/battery_switch" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:text="@string/save_battery" + app:icon="@drawable/ic_battery_36" + /> + + <se.leap.bitmaskclient.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.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.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" + /> + + <View android:layout_width="match_parent" + android:layout_height="20dp" + android:background="@color/black800_high_transparent" + /> + + <se.leap.bitmaskclient.views.IconTextEntry + android:id="@+id/donate" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignTop="@id/divider" - android:layout_alignParentBottom="true" - > - <ListView - android:id="@+id/settingsList" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom" - /> - </FrameLayout> + app:text="@string/donate_title" + app:icon="@drawable/ic_donate_36" + android:visibility="gone" + /> + <se.leap.bitmaskclient.views.IconTextEntry + android:id="@+id/log" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:text="@string/log_fragment_title" + app:icon="@drawable/ic_log_36" + /> + + <se.leap.bitmaskclient.views.IconTextEntry + android:id="@+id/about" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:text="@string/about_fragment_title" + app:icon="@drawable/ic_about_36" + /> - </RelativeLayout> + </LinearLayout> -</LinearLayout>
\ No newline at end of file +</ScrollView> diff --git a/app/src/main/res/layout/v_icon_text_list_item.xml b/app/src/main/res/layout/v_icon_text_list_item.xml index 0631b2fc..64cc474a 100644 --- a/app/src/main/res/layout/v_icon_text_list_item.xml +++ b/app/src/main/res/layout/v_icon_text_list_item.xml @@ -1,6 +1,6 @@ -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/item_container" - android:layout_height="wrap_content" + android:layout_height="?android:attr/listPreferredItemHeightSmall" android:layout_width="match_parent" android:orientation="horizontal" xmlns:tools="http://schemas.android.com/tools"> @@ -26,6 +26,33 @@ android:paddingRight="?android:attr/listPreferredItemPaddingRight" android:minHeight="?android:attr/listPreferredItemHeightSmall" tools:text="TEST" + android:layout_toEndOf="@id/material_icon" + android:layout_toRightOf="@+id/material_icon" + android:layout_above="@+id/subtitle" /> -</LinearLayout> + <TextView + android:id="@+id/subtitle" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:layout_alignParentBottom="true" + android:textAppearance="?android:attr/textAppearanceSmall" + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingLeft="?android:attr/listPreferredItemPaddingLeft" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:paddingRight="?android:attr/listPreferredItemPaddingRight" + android:paddingBottom="4dp" + tools:text="TEST" + android:visibility="gone" + android:layout_toEndOf="@id/material_icon" + android:layout_toRightOf="@+id/material_icon" + /> + + <View + android:layout_width="match_parent" + android:layout_height="1px" + android:background="@android:color/darker_gray" + android:layout_alignParentBottom="true" + /> +</RelativeLayout> diff --git a/app/src/main/res/layout/v_switch_list_item.xml b/app/src/main/res/layout/v_switch_list_item.xml index 26060a73..967d7a97 100644 --- a/app/src/main/res/layout/v_switch_list_item.xml +++ b/app/src/main/res/layout/v_switch_list_item.xml @@ -29,6 +29,25 @@ tools:text="TEST" android:layout_toEndOf="@id/material_icon" android:layout_toRightOf="@+id/material_icon" + android:layout_above="@+id/subtitle" + /> + + <TextView + android:id="@+id/subtitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:layout_alignParentBottom="true" + android:textAppearance="?android:attr/textAppearanceSmall" + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingLeft="?android:attr/listPreferredItemPaddingLeft" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:paddingRight="?android:attr/listPreferredItemPaddingRight" + android:paddingBottom="4dp" + tools:text="TEST" + android:visibility="gone" + android:layout_toEndOf="@id/material_icon" + android:layout_toRightOf="@+id/material_icon" /> <android.support.v7.widget.SwitchCompat @@ -45,4 +64,11 @@ android:minHeight="?android:attr/listPreferredItemHeightSmall" android:checked="false" tools:text="" /> + + <View + android:layout_width="match_parent" + android:layout_height="1px" + android:background="@android:color/darker_gray" + android:layout_alignParentBottom="true" + /> </RelativeLayout>
\ No newline at end of file diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index eb9626bc..d3a88b81 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -1,6 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> <resources> + <!--TODO: check that it's not needed and throw it out!--> <declare-styleable name="foo"> <attr name="textColorError" format="color" /> </declare-styleable> + + <attr name="text" format="string|reference"/> + <attr name="icon" format="reference"/> + <attr name="subtitle" format="string|reference"/> + <declare-styleable name="IconSwitchEntry"> + <attr name="text"/> + <attr name="subtitle" /> + <attr name="icon"/> + </declare-styleable> + + <declare-styleable name="IconTextEntry"> + <attr name="text"/> + <attr name="subtitle" /> + <attr name="icon"/> + </declare-styleable> </resources>
\ 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 e685cff5..27f508d5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -103,6 +103,7 @@ <string name="save_battery">Save battery</string> <string name="save_battery_message">Background data connections will hibernate when your phone is inactive.</string> <string name="always_on_vpn">Always-on VPN</string> + <string name="subtitle_always_on_vpn">Open Android System Settings</string> <string name="do_not_show_again">Do not show again</string> <string name="always_on_vpn_user_message">To enable always-on VPN in Android VPN Settings click on the configure icon [img src] and turn the switch on.</string> <string name="always_on_blocking_vpn_user_message">To protect your privacy optimally, you should also activate the option \"Block connections without VPN\".</string> @@ -111,6 +112,10 @@ <string name="donate_message">LEAP depends on donations and grants. Please donate today if you value secure communication that is easy for both the end-user and the service provider.</string> <string name="donate_button_remind_later">Remind me later</string> <string name="donate_button_donate">Donate</string> + <string name="obfuscated_connection">Using an obfuscated connection.</string> + <string name="obfuscated_connection_try">Trying an obfuscated connection.</string> + <string name="nav_drawer_obfuscated_connection">Using Bridges</string> + <string name="nav_drawer_subtitle_obfuscated_connection">Circumvent VPN filtering</string> <string name="warning_exclude_apps_message">Be careful of excluding apps from VPN. This will reveal your identity and compromise your security.</string> </resources> diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 51a8ea0e..7e98ccf4 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -20,4 +20,8 @@ <item name="android:windowBackground">@drawable/splash_page</item> </style> + <style name="invisibleTheme" parent="@android:style/Theme.Translucent.NoTitleBar"> + <item name="android:windowAnimationStyle">@null</item> + </style> + </resources> |