import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.app.AppCompatDialogFragment;
+import android.text.Editable;
import android.text.Html;
+import android.text.TextUtils;
+import android.text.TextWatcher;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
mBlockIPv4 = (CheckBox)findViewById(R.id.split_tunneling_v4);
mBlockIPv6 = (CheckBox)findViewById(R.id.split_tunneling_v6);
+ mGateway.addTextChangedListener(new TextWatcher() {
+ @Override
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
+
+ @Override
+ public void onTextChanged(CharSequence s, int start, int before, int count) {}
+
+ @Override
+ public void afterTextChanged(Editable s) {
+ if (TextUtils.isEmpty(mGateway.getText()))
+ {
+ mName.setHint(R.string.profile_name_hint);
+ }
+ else
+ {
+ mName.setHint("(" + mGateway.getText() + ")");
+ }
+ }
+ });
+
mSelectVpnType.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id)
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2012-2015 Tobias Brunner
+ Copyright (C) 2012-2016 Tobias Brunner
Copyright (C) 2012 Giuliano Grassi
Copyright (C) 2012 Ralf Sager
- Hochschule fuer Technik Rapperswil
+ HSR Hochschule fuer Technik Rapperswil
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
android:orientation="vertical"
android:padding="10dp" >
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dp"
- android:text="@string/profile_name_label" />
-
- <EditText
- android:id="@+id/name"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:inputType="textNoSuggestions"
- android:hint="@string/profile_name_hint" />
-
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/select_certificate"
layout="@layout/two_line_button" />
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
+ android:text="@string/profile_name_label" />
+
+ <EditText
+ android:id="@+id/name"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:inputType="textNoSuggestions"
+ android:hint="@string/profile_use_server_hint" />
+
<CheckBox
android:id="@+id/show_advanced"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
android:text="@string/profile_show_advanced_label" />
<LinearLayout
android:text="@string/profile_split_tunnelingv6_title" />
</LinearLayout>
+
</LinearLayout>
</ScrollView>
\ No newline at end of file