diff options
Diffstat (limited to 'main/src/main/res')
-rw-r--r-- | main/src/main/res/drawable/white_rect.xml | 3 | ||||
-rw-r--r-- | main/src/main/res/layout/allowed_application_layout.xml | 59 | ||||
-rw-r--r-- | main/src/main/res/layout/allowed_vpn_apps.xml | 66 | ||||
-rwxr-xr-x | main/src/main/res/values/strings.xml | 8 | ||||
-rw-r--r-- | main/src/main/res/xml/vpn_headers.xml | 5 |
5 files changed, 139 insertions, 2 deletions
diff --git a/main/src/main/res/drawable/white_rect.xml b/main/src/main/res/drawable/white_rect.xml index bb5a9fba..da286e5b 100644 --- a/main/src/main/res/drawable/white_rect.xml +++ b/main/src/main/res/drawable/white_rect.xml @@ -5,7 +5,6 @@ --> <shape xmlns:android="http://schemas.android.com/apk/res/android"> - <solid android:color="#42000000" /> - <corners android:radius="5dp" /> + <solid android:color="@android:color/background_light" /> </shape>
\ No newline at end of file diff --git a/main/src/main/res/layout/allowed_application_layout.xml b/main/src/main/res/layout/allowed_application_layout.xml new file mode 100644 index 00000000..fddfe22c --- /dev/null +++ b/main/src/main/res/layout/allowed_application_layout.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (c) 2012-2014 Arne Schwabe + ~ Distributed under the GNU GPL v2. For full terms see the file doc/LICENSE.txt + --> + +<GridLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?android:attr/listPreferredItemHeight" + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:paddingTop="8dip" + android:paddingBottom="8dip" + android:columnCount="4"> + + <ImageView + android:id="@+id/app_icon" + android:layout_width="@android:dimen/app_icon_size" + android:layout_height="@android:dimen/app_icon_size" + android:layout_rowSpan="2" + android:layout_marginEnd="8dip" + android:scaleType="centerInside" + tools:drawable="@drawable/icon" + android:contentDescription="@null" /> + + <TextView + tools:text="@string/app" + android:id="@+id/app_name" + android:layout_width="0dip" + android:layout_columnSpan="2" + android:layout_gravity="fill_horizontal" + android:layout_marginTop="2dip" + android:singleLine="true" + android:ellipsize="marquee" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textAlignment="viewStart" /> + + <CheckBox android:id="@+id/app_selected" + android:layout_marginStart="8dip" + android:layout_gravity="center_vertical" + android:layout_rowSpan="2" + android:visibility="visible" /> + + <TextView + android:id="@+id/app_size" + android:layout_width="0dip" + android:layout_gravity="fill_horizontal|top" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textAlignment="viewStart" /> + + <TextView + android:id="@+id/app_disabled" + android:layout_marginStart="8dip" + android:layout_gravity="top" + android:textAppearance="?android:attr/textAppearanceSmall" /> + +</GridLayout>
\ No newline at end of file diff --git a/main/src/main/res/layout/allowed_vpn_apps.xml b/main/src/main/res/layout/allowed_vpn_apps.xml new file mode 100644 index 00000000..e5228f8a --- /dev/null +++ b/main/src/main/res/layout/allowed_vpn_apps.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (c) 2012-2014 Arne Schwabe + ~ Distributed under the GNU GPL v2. For full terms see the file doc/LICENSE.txt + --> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <RadioGroup + android:id="@+id/allowed_vpn_radiogroup" + android:layout_width="match_parent" + android:elevation="2dp" + android:background="@drawable/white_rect" + android:layout_height="wrap_content"> + + <RadioButton + android:layout_margin="@dimen/stdpadding" + android:id="@+id/radio_vpn_disallow" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/vpn_disallow_radio" /> + + <RadioButton + android:layout_margin="@dimen/stdpadding" + android:id="@+id/radio_vpn_allow" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/vpn_allow_radio" /> + </RadioGroup> + + <ListView + android:id="@android:id/list" + android:drawSelectorOnTop="false" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:clipToPadding="false" + android:scrollbarStyle="outsideOverlay" /> + + + <LinearLayout + android:id="@+id/loading_container" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:visibility="visible" + android:gravity="center"> + + <ProgressBar + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceSmall" + android:text="@string/loading" + android:paddingTop="4dip" + android:singleLine="true" /> + + </LinearLayout> + + +</LinearLayout>
\ No newline at end of file diff --git a/main/src/main/res/values/strings.xml b/main/src/main/res/values/strings.xml index 964ce2ae..4a76ac70 100755 --- a/main/src/main/res/values/strings.xml +++ b/main/src/main/res/values/strings.xml @@ -328,5 +328,13 @@ <string name="mssfix_dialogtitle">Set MSS of TCP payload</string> <string name="client_behaviour">Client behaviour</string> <string name="clear_external_apps">Clear allowed external apps</string> + <string name="loading">Loading…</string> + <string name="vpn_allow_mode_is_allow">Allow only these applications to use the VPN. Other apps will use the normal connection.</string> + <string name="vpn_allow_mode_is_disallow">Do not allow these applications to use the VPN. Other apps will use the VPN connection.</string> + <string name="allowed_vpn_apps_info">Allowed VPN apps: %1$s</string> + <string name="disallowed_vpn_apps_info">Disallowed VPN apps: %1$s</string> + <string name="app_no_longer_exists">Package %s is no longer installed, removing it from app allow/disallow list</string> + <string name="vpn_disallow_radio">VPN is used for all apps but exclude selected</string> + <string name="vpn_allow_radio">VPN is used for only for selected apps</string> </resources> diff --git a/main/src/main/res/xml/vpn_headers.xml b/main/src/main/res/xml/vpn_headers.xml index 576aea8b..18b78c09 100644 --- a/main/src/main/res/xml/vpn_headers.xml +++ b/main/src/main/res/xml/vpn_headers.xml @@ -28,6 +28,11 @@ android:fragment="de.blinkt.openvpn.fragments.Settings_Authentication" android:title="@string/settings_auth" /> + <header + android:fragment="de.blinkt.openvpn.fragments.Settings_Allowed_Apps" + android:title="Allowed Apps on VPN" + android:id="@+id/allowed_apps_header" + /> <!-- android:icon="@drawable/ic_settings_display" --> <header android:fragment="de.blinkt.openvpn.fragments.Settings_Obscure" |