summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/activities/MainActivity.java80
-rw-r--r--main/src/main/java/de/blinkt/openvpn/activities/VPNPreferences.java109
-rw-r--r--main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java15
-rw-r--r--main/src/main/java/de/blinkt/openvpn/views/ScreenSlidePagerAdapter.java79
-rw-r--r--main/src/main/res/layout-v21/config_fab.xml21
-rw-r--r--main/src/main/res/layout-v21/tabs.xml4
-rw-r--r--main/src/main/res/layout/allowed_vpn_apps.xml8
-rw-r--r--main/src/main/res/layout/basic_settings.xml1
-rw-r--r--main/src/main/res/layout/config_fab.xml9
-rw-r--r--main/src/main/res/layout/connections.xml2
-rw-r--r--main/src/main/res/layout/viewconfig.xml27
-rw-r--r--main/src/main/res/layout/vpn_remote.xml82
-rw-r--r--main/src/main/res/values/dimens.xml1
-rwxr-xr-xmain/src/main/res/values/strings.xml2
14 files changed, 248 insertions, 192 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/activities/MainActivity.java b/main/src/main/java/de/blinkt/openvpn/activities/MainActivity.java
index d59640de..5e84e93b 100644
--- a/main/src/main/java/de/blinkt/openvpn/activities/MainActivity.java
+++ b/main/src/main/java/de/blinkt/openvpn/activities/MainActivity.java
@@ -5,23 +5,23 @@
package de.blinkt.openvpn.activities;
+import android.annotation.TargetApi;
+import android.app.ActionBar;
import android.app.Activity;
import android.app.Fragment;
-import android.app.FragmentManager;
import android.content.Intent;
+import android.os.Build;
import android.support.annotation.StringRes;
-import android.support.v4n.app.FragmentStatePagerAdapter;
import android.support.v4n.view.ViewPager;
-import java.util.Vector;
-
import de.blinkt.openvpn.R;
import de.blinkt.openvpn.fragments.AboutFragment;
import de.blinkt.openvpn.fragments.FaqFragment;
import de.blinkt.openvpn.fragments.GeneralSettings;
+import de.blinkt.openvpn.fragments.LogFragment;
import de.blinkt.openvpn.fragments.SendDumpFragment;
import de.blinkt.openvpn.fragments.VPNProfileList;
-import de.blinkt.openvpn.views.PagerSlidingTabStrip;
+import de.blinkt.openvpn.views.ScreenSlidePagerAdapter;
import de.blinkt.openvpn.views.SlidingTabLayout;
import de.blinkt.openvpn.views.TabBarView;
@@ -40,9 +40,12 @@ public class MainActivity extends Activity {
// Instantiate a ViewPager and a PagerAdapter.
mPager = (ViewPager) findViewById(R.id.pager);
- mPagerAdapter = new ScreenSlidePagerAdapter(getFragmentManager());
-
+ mPagerAdapter = new ScreenSlidePagerAdapter(getFragmentManager(), this);
+ /* Toolbar and slider should have the same elevation */
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ disableToolbarElevation();
+ }
@@ -55,72 +58,23 @@ public class MainActivity extends Activity {
mPagerAdapter.addTab(R.string.crashdump, SendDumpFragment.class);
}
+ mPagerAdapter.addTab(R.string.openvpn_log, LogFragment.class);
+
mPagerAdapter.addTab(R.string.about, AboutFragment.class);
mPager.setAdapter(mPagerAdapter);
- /*mSlidingTabLayout = (SlidingTabLayout) findViewById(R.id.slding_tabs);
- mSlidingTabLayout.setViewPager(mPager); */
-
TabBarView tabs = (TabBarView) findViewById(R.id.sliding_tabs);
tabs.setViewPager(mPager);
-
- /*
- if (false) {
- Tab logtab = bar.newTab().setText("Log");
- logtab.setTabListener(new TabListener<LogFragment>("log", LogFragment.class));
- bar.addTab(logtab);
- }*/
-
-
-
}
- class Tab {
- public Class<? extends Fragment> fragmentClass;
- String mName;
-
- public Tab(Class<? extends Fragment> fClass, @StringRes String name){
- mName = name;
- fragmentClass = fClass;
- }
-
+ @TargetApi(Build.VERSION_CODES.LOLLIPOP)
+ private void disableToolbarElevation() {
+ ActionBar toolbar = getActionBar();
+ toolbar.setElevation(0);
}
- private class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter {
- private Vector<Tab> mTabs = new Vector<Tab>();
-
- public ScreenSlidePagerAdapter(FragmentManager fm) {
- super(fm);
- }
-
- @Override
- public Fragment getItem(int position) {
- try {
- return mTabs.get(position).fragmentClass.newInstance();
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- @Override
- public CharSequence getPageTitle(int position) {
- return mTabs.get(position).mName;
- }
-
- @Override
- public int getCount() {
- return mTabs.size();
- }
-
- public void addTab(@StringRes int name, Class<? extends Fragment> fragmentClass) {
- mTabs.add(new Tab(fragmentClass, getString(name)));
- }
- }
- @Override
+ @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
diff --git a/main/src/main/java/de/blinkt/openvpn/activities/VPNPreferences.java b/main/src/main/java/de/blinkt/openvpn/activities/VPNPreferences.java
index 5bff4828..4eee5eea 100644
--- a/main/src/main/java/de/blinkt/openvpn/activities/VPNPreferences.java
+++ b/main/src/main/java/de/blinkt/openvpn/activities/VPNPreferences.java
@@ -5,23 +5,27 @@
package de.blinkt.openvpn.activities;
-import java.util.List;
-
import android.annotation.TargetApi;
+import android.app.ActionBar;
+import android.app.Activity;
import android.app.AlertDialog;
-import android.app.Fragment;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceActivity;
-import android.preference.PreferenceFragment;
+import android.support.v4n.view.ViewPager;
import android.view.Menu;
import android.view.MenuItem;
import de.blinkt.openvpn.R;
import de.blinkt.openvpn.VpnProfile;
import de.blinkt.openvpn.core.ProfileManager;
+import de.blinkt.openvpn.fragments.AboutFragment;
+import de.blinkt.openvpn.fragments.FaqFragment;
+import de.blinkt.openvpn.fragments.GeneralSettings;
+import de.blinkt.openvpn.fragments.LogFragment;
+import de.blinkt.openvpn.fragments.SendDumpFragment;
import de.blinkt.openvpn.fragments.Settings_Allowed_Apps;
import de.blinkt.openvpn.fragments.Settings_Authentication;
import de.blinkt.openvpn.fragments.Settings_Basic;
@@ -32,9 +36,11 @@ import de.blinkt.openvpn.fragments.Settings_Obscure;
import de.blinkt.openvpn.fragments.Settings_Routing;
import de.blinkt.openvpn.fragments.ShowConfigFragment;
import de.blinkt.openvpn.fragments.VPNProfileList;
+import de.blinkt.openvpn.views.ScreenSlidePagerAdapter;
+import de.blinkt.openvpn.views.TabBarView;
-public class VPNPreferences extends PreferenceActivity {
+public class VPNPreferences extends Activity {
static final Class validFragments[] = new Class[] {
Settings_Authentication.class, Settings_Basic.class, Settings_IP.class,
@@ -44,14 +50,15 @@ public class VPNPreferences extends PreferenceActivity {
private String mProfileUUID;
private VpnProfile mProfile;
+ private ViewPager mPager;
+ private ScreenSlidePagerAdapter mPagerAdapter;
- public VPNPreferences() {
+ public VPNPreferences() {
super();
}
@TargetApi(Build.VERSION_CODES.KITKAT)
- @Override
protected boolean isValidFragment(String fragmentName) {
for (Class c: validFragments)
if (c.getName().equals(fragmentName))
@@ -74,22 +81,7 @@ public class VPNPreferences extends PreferenceActivity {
@Override
protected void onResume() {
super.onResume();
- Intent intent = getIntent();
-
-
- if(intent!=null) {
- String profileUUID = intent.getStringExtra(getPackageName() + ".profileUUID");
- if(profileUUID==null) {
- Bundle initialArguments = getIntent().getBundleExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS);
- profileUUID = initialArguments.getString(getPackageName() + ".profileUUID");
- }
- if(profileUUID!=null){
-
- mProfileUUID = profileUUID;
- mProfile = ProfileManager.get(this,mProfileUUID);
-
- }
- }
+ getProfile();
// When a profile is deleted from a category fragment in hadset mod we need to finish
// this activity as well when returning
if (mProfile==null || mProfile.profileDleted) {
@@ -98,7 +90,25 @@ public class VPNPreferences extends PreferenceActivity {
}
}
- @Override
+ private void getProfile() {
+ Intent intent = getIntent();
+
+ if(intent!=null) {
+ String profileUUID = intent.getStringExtra(getPackageName() + ".profileUUID");
+ if(profileUUID==null) {
+ Bundle initialArguments = getIntent().getBundleExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT_ARGUMENTS);
+ profileUUID = initialArguments.getString(getPackageName() + ".profileUUID");
+ }
+ if(profileUUID!=null){
+
+ mProfileUUID = profileUUID;
+ mProfile = ProfileManager.get(this, mProfileUUID);
+
+ }
+ }
+ }
+
+ @Override
protected void onCreate(Bundle savedInstanceState) {
mProfileUUID = getIntent().getStringExtra(getPackageName() + ".profileUUID");
if(savedInstanceState!=null){
@@ -113,10 +123,50 @@ public class VPNPreferences extends PreferenceActivity {
}
super.onCreate(savedInstanceState);
- }
+ setContentView(R.layout.main_activity);
+
+ /* Toolbar and slider should have the same elevation */
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ disableToolbarElevation();
+ }
+
+ // Instantiate a ViewPager and a PagerAdapter.
+ mPager = (ViewPager) findViewById(R.id.pager);
+ mPagerAdapter = new ScreenSlidePagerAdapter(getFragmentManager(), this);
+ Bundle fragmentArguments = new Bundle();
+ fragmentArguments.putString(getPackageName() + ".profileUUID",mProfileUUID);
+ mPagerAdapter.setFragmentArgs(fragmentArguments);
+
+ mPagerAdapter.addTab(R.string.client_behaviour, Settings_Behaviour.class);
+
+ mPagerAdapter.addTab(R.string.server_list, Settings_Connections.class);
+
+ mPagerAdapter.addTab(R.string.basic, Settings_Basic.class);
+ mPagerAdapter.addTab(R.string.ipdns, Settings_IP.class);
+ mPagerAdapter.addTab(R.string.routing, Settings_Routing.class);
+ mPagerAdapter.addTab(R.string.settings_auth, Settings_Authentication.class);
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
+ mPagerAdapter.addTab(R.string.vpn_allowed_apps, Settings_Allowed_Apps.class);
+
+ mPagerAdapter.addTab(R.string.advanced, Settings_Obscure.class);
+ mPagerAdapter.addTab(R.string.generated_config, ShowConfigFragment.class);
+
+
+
+
+ mPager.setAdapter(mPagerAdapter);
+
+ TabBarView tabs = (TabBarView) findViewById(R.id.sliding_tabs);
+ tabs.setViewPager(mPager);
+
+ }
+
+
+/*
@Override
public void onBuildHeaders(List<Header> target) {
loadHeadersFromResource(R.xml.vpn_headers, target);
@@ -130,7 +180,7 @@ public class VPNPreferences extends PreferenceActivity {
}
if (headerToRemove != null)
target.remove(headerToRemove);
- }
+ }*/
@Override
public void onBackPressed() {
@@ -176,5 +226,12 @@ public class VPNPreferences extends PreferenceActivity {
finish();
}
+
+ @TargetApi(Build.VERSION_CODES.LOLLIPOP)
+ private void disableToolbarElevation() {
+ ActionBar toolbar = getActionBar();
+ toolbar.setElevation(0);
+ }
+
}
diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java b/main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java
index 11a4842c..93af34af 100644
--- a/main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java
+++ b/main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java
@@ -7,6 +7,7 @@ package de.blinkt.openvpn.fragments;
import android.app.Fragment;
import android.content.Intent;
+import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -14,6 +15,7 @@ import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.ImageButton;
import android.widget.TextView;
import de.blinkt.openvpn.R;
import de.blinkt.openvpn.VpnProfile;
@@ -30,6 +32,16 @@ public class ShowConfigFragment extends Fragment {
final TextView cv = (TextView) v.findViewById(R.id.configview);
int check=vp.checkProfile(getActivity());
+
+ ImageButton fabButton = (ImageButton) v.findViewById(R.id.share_config);
+ if (fabButton!=null)
+ fabButton.setOnClickListener( new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ shareConfig();
+ }
+ });
+
if(check!=R.string.no_error_found) {
cv.setText(check);
configtext = getString(check);
@@ -70,7 +82,8 @@ public class ShowConfigFragment extends Fragment {
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
- inflater.inflate(R.menu.configmenu, menu);
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
+ inflater.inflate(R.menu.configmenu, menu);
}
private void shareConfig() {
diff --git a/main/src/main/java/de/blinkt/openvpn/views/ScreenSlidePagerAdapter.java b/main/src/main/java/de/blinkt/openvpn/views/ScreenSlidePagerAdapter.java
new file mode 100644
index 00000000..e41583bf
--- /dev/null
+++ b/main/src/main/java/de/blinkt/openvpn/views/ScreenSlidePagerAdapter.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2012-2014 Arne Schwabe
+ * Distributed under the GNU GPL v2. For full terms see the file doc/LICENSE.txt
+ */
+
+package de.blinkt.openvpn.views;
+
+import android.app.Fragment;
+import android.app.FragmentManager;
+import android.content.Context;
+import android.content.res.Resources;
+import android.os.Bundle;
+import android.support.annotation.StringRes;
+import android.support.v4n.app.FragmentStatePagerAdapter;
+
+import java.util.Vector;
+
+import de.blinkt.openvpn.activities.MainActivity;
+
+/**
+* Created by arne on 18.11.14.
+*/
+public class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter {
+
+ private final Resources res;
+ private Bundle mFragmentArguments;
+
+ public void setFragmentArgs(Bundle fragmentArguments) {
+ mFragmentArguments = fragmentArguments;
+ }
+
+ static class Tab {
+ public Class<? extends Fragment> fragmentClass;
+ String mName;
+
+ public Tab(Class<? extends Fragment> fClass, @StringRes String name){
+ mName = name;
+ fragmentClass = fClass;
+ }
+
+ }
+
+
+ private Vector<Tab> mTabs = new Vector<Tab>();
+
+ public ScreenSlidePagerAdapter(FragmentManager fm, Context c) {
+ super(fm);
+ res = c.getResources();
+ }
+
+ @Override
+ public Fragment getItem(int position) {
+ try {
+ Fragment fragment = mTabs.get(position).fragmentClass.newInstance();
+ if (mFragmentArguments!=null)
+ fragment.setArguments(mFragmentArguments);
+ return fragment;
+ } catch (InstantiationException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ @Override
+ public CharSequence getPageTitle(int position) {
+ return mTabs.get(position).mName;
+ }
+
+ @Override
+ public int getCount() {
+ return mTabs.size();
+ }
+
+ public void addTab(@StringRes int name, Class<? extends Fragment> fragmentClass) {
+ mTabs.add(new Tab(fragmentClass, res.getString(name)));
+ }
+}
diff --git a/main/src/main/res/layout-v21/config_fab.xml b/main/src/main/res/layout-v21/config_fab.xml
new file mode 100644
index 00000000..9e7e4e6c
--- /dev/null
+++ b/main/src/main/res/layout-v21/config_fab.xml
@@ -0,0 +1,21 @@
+<?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
+ -->
+
+<ImageButton xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/share_config"
+ android:layout_width="@dimen/round_button_diameter"
+ android:layout_height="@dimen/round_button_diameter"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentRight="true"
+ android:layout_marginBottom="16dp"
+ android:layout_marginRight="16dp"
+ android:background="@drawable/oval_ripple"
+ android:elevation="1dp"
+ android:src="@drawable/ic_menu_share"
+ android:stateListAnimator="@anim/fab_anim"
+ android:tint="@android:color/white"
+ tools:showIn="@layout/viewconfig" /> \ No newline at end of file
diff --git a/main/src/main/res/layout-v21/tabs.xml b/main/src/main/res/layout-v21/tabs.xml
index 095f863e..be6ce9f1 100644
--- a/main/src/main/res/layout-v21/tabs.xml
+++ b/main/src/main/res/layout-v21/tabs.xml
@@ -2,12 +2,14 @@
~ Copyright (c) 2012-2014 Arne Schwabe
~ Distributed under the GNU GPL v2. For full terms see the file doc/LICENSE.txt
-->
-<merge>
+<merge xmlns:blinkt="http://schemas.android.com/apk/res-auto">
<de.blinkt.openvpn.views.PagerSlidingTabStrip xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@drawable/bg_tabs"
+ blinkt:pstsIndicatorColor="@color/accent"
+ blinkt:pstsIndicatorHeight="6dp"
android:elevation="4dp" />
</merge> \ 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
index b3d074e8..66665cb6 100644
--- a/main/src/main/res/layout/allowed_vpn_apps.xml
+++ b/main/src/main/res/layout/allowed_vpn_apps.xml
@@ -5,18 +5,10 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
- android:background="@color/rot"
android:orientation="vertical"
- android:layout_marginLeft="-20dp"
- android:layout_marginRight="-20dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
- <Button
- android:background="@color/primary"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/main/src/main/res/layout/basic_settings.xml b/main/src/main/res/layout/basic_settings.xml
index f8546a1b..b9ff6a98 100644
--- a/main/src/main/res/layout/basic_settings.xml
+++ b/main/src/main/res/layout/basic_settings.xml
@@ -8,6 +8,7 @@
xmlns:blinkt="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
+ android:padding="@dimen/vpn_setting_padding"
android:layout_height="wrap_content" >
<LinearLayout
diff --git a/main/src/main/res/layout/config_fab.xml b/main/src/main/res/layout/config_fab.xml
new file mode 100644
index 00000000..c98b044d
--- /dev/null
+++ b/main/src/main/res/layout/config_fab.xml
@@ -0,0 +1,9 @@
+<?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
+ -->
+
+<merge>
+
+</merge> \ No newline at end of file
diff --git a/main/src/main/res/layout/connections.xml b/main/src/main/res/layout/connections.xml
index 12de24bc..44980e44 100644
--- a/main/src/main/res/layout/connections.xml
+++ b/main/src/main/res/layout/connections.xml
@@ -14,6 +14,7 @@
<CheckBox
+ android:layout_margin="@dimen/vpn_setting_padding"
android:text="@string/remote_random"
android:id="@+id/remote_random"
android:padding="@dimen/stdpadding"
@@ -21,6 +22,7 @@
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
+ android:layout_margin="@dimen/vpn_setting_padding"
android:id="@+id/connection_recycler_view"
android:layout_below="@id/remote_random"
android:layout_width="match_parent"
diff --git a/main/src/main/res/layout/viewconfig.xml b/main/src/main/res/layout/viewconfig.xml
index f123cf9d..9efe5bed 100644
--- a/main/src/main/res/layout/viewconfig.xml
+++ b/main/src/main/res/layout/viewconfig.xml
@@ -1,18 +1,23 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2012-2014 Arne Schwabe
~ Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt
-->
-
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:padding="@dimen/stdpadding"
- android:scrollbarStyle="outsideOverlay"
+<RelativeLayout
android:layout_width="match_parent"
- android:layout_height="match_parent" >
+ android:layout_height="match_parent"
+ xmlns:android="http://schemas.android.com/apk/res/android">
- <TextView
- android:id="@+id/configview"
+ <ScrollView
android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ android:layout_height="match_parent"
+ android:padding="@dimen/vpn_setting_padding"
+ android:scrollbarStyle="outsideOverlay">
+
+ <TextView
+ android:id="@+id/configview"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+ </ScrollView>
-</ScrollView> \ No newline at end of file
+ <include layout="@layout/config_fab" />
+</RelativeLayout> \ No newline at end of file
diff --git a/main/src/main/res/layout/vpn_remote.xml b/main/src/main/res/layout/vpn_remote.xml
deleted file mode 100644
index a02a1c50..00000000
--- a/main/src/main/res/layout/vpn_remote.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <TextView
- style="@style/item"
- android:text="@string/address"
- android:textAppearance="?android:attr/textAppearanceSmall" />
-
- <EditText
- android:id="@+id/address"
- style="@style/item"
- android:inputType="textUri"
- android:text="@string/defaultserver" >
-
- <!-- <requestFocus /> -->
- </EditText>
-
- <TextView
- style="@style/item"
- android:text="@string/port"
- android:textAppearance="?android:attr/textAppearanceSmall" />
-
- <RelativeLayout
- android:id="@+id/relativeLayout1"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="8dip"
- android:layout_marginRight="8dip" >
-
- <EditText
- android:id="@+id/port"
- style="@style/item"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:inputType="number"
- android:text="@string/defaultport" />
-
- <ToggleButton
- android:id="@+id/tcpudp"
- style="@style/accountSetupButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:textOff="TCP"
- android:textOn="UDP" />
- </RelativeLayout>
-
- <CheckBox
- android:id="@+id/lzo"
- style="@style/item"
- android:text="@string/useLZO" />
-
-
- <CheckBox
- android:id="@+id/enableCustomConnection"
- android:summary=""
- android:text="@string/custom_config_title"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/custom_option_warning"
- />
-
- <EditText
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:inputType="textMultiLine"
- android:ems="10"
- android:id="@+id/editText"
- android:layout_gravity="center_horizontal" />
-
-
-</LinearLayout> \ No newline at end of file
diff --git a/main/src/main/res/values/dimens.xml b/main/src/main/res/values/dimens.xml
index 1abe1957..0ac55f05 100644
--- a/main/src/main/res/values/dimens.xml
+++ b/main/src/main/res/values/dimens.xml
@@ -15,6 +15,7 @@
<dimen name="add_button_margin">16dp</dimen>
<dimen name="round_button_diameter">56dp</dimen>
<dimen name="switchbar_pad">16dp</dimen>
+ <dimen name="vpn_setting_padding">16dp</dimen>
</resources> \ 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 371466e3..9c7ade61 100755
--- a/main/src/main/res/values/strings.xml
+++ b/main/src/main/res/values/strings.xml
@@ -340,5 +340,7 @@
<string name="add_remote">Add new remote</string>
<string name="remote_random">Use connection entries in random order on connect</string>
<string name="remote_no_server_selected">You need to define and enable at least one remote server.</string>
+ <string name="server_list">Server List</string>
+ <string name="vpn_allowed_apps">Allowed Apps</string>
</resources>