aboutsummaryrefslogtreecommitdiffstats
path: root/app/src
diff options
context:
space:
mode:
authorKyle Horimoto <khorimoto@gmail.com>2015-10-02 16:23:26 -0700
committerKyle Horimoto <khorimoto@gmail.com>2015-10-05 16:52:18 -0700
commit8b78652c17d9d5f5d71d5a1d5b740fc70714dfb5 (patch)
treeb7b25be10c788f7ec9becba99a5cb18ce6e9b8e3 /app/src
parent14318dab67d7c013b1a88861367eecb423010e70 (diff)
downloadconnectbot-8b78652c17d9d5f5d71d5a1d5b740fc70714dfb5.tar.gz
connectbot-8b78652c17d9d5f5d71d5a1d5b740fc70714dfb5.tar.bz2
connectbot-8b78652c17d9d5f5d71d5a1d5b740fc70714dfb5.zip
Add connection options.
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/org/connectbot/HostEditorFragment.java157
-rw-r--r--app/src/main/res/layout/fragment_host_editor.xml518
-rw-r--r--app/src/main/res/values/strings.xml1
3 files changed, 523 insertions, 153 deletions
diff --git a/app/src/main/java/org/connectbot/HostEditorFragment.java b/app/src/main/java/org/connectbot/HostEditorFragment.java
index f0a8c4f..0312f5d 100644
--- a/app/src/main/java/org/connectbot/HostEditorFragment.java
+++ b/app/src/main/java/org/connectbot/HostEditorFragment.java
@@ -25,6 +25,8 @@ import android.os.Bundle;
import android.os.Parcelable;
import android.support.design.widget.TextInputLayout;
import android.support.v4.app.Fragment;
+import android.support.v7.widget.AppCompatCheckBox;
+import android.support.v7.widget.SwitchCompat;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
@@ -32,10 +34,12 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
+import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.SeekBar;
import android.widget.Spinner;
+import android.widget.Switch;
import android.widget.TextView;
import org.connectbot.bean.HostBean;
@@ -76,6 +80,12 @@ public class HostEditorFragment extends Fragment {
// the text in the Spinner because the text is localized while these values are not.
private TypedArray mColorValues;
+ // Likewise, but for SSH auth agent values.
+ private TypedArray mSshAuthValues;
+
+ // Likewise, but for DEL key values.
+ private TypedArray mDelKeyValues;
+
private Spinner mTransportSpinner;
private TextInputLayout mQuickConnectContainer;
private EditText mQuickConnectField;
@@ -91,6 +101,17 @@ public class HostEditorFragment extends Fragment {
private Spinner mColorSelector;
private TextView mFontSizeText;
private SeekBar mFontSizeSeekBar;
+ private Spinner mPubkeySpinner;
+ private View mUseSshConfirmationContainer;
+ private SwitchCompat mUseSshAuthSwitch;
+ private AppCompatCheckBox mSshAuthConfirmationCheckbox;
+ private SwitchCompat mCompressionSwitch;
+ private SwitchCompat mStartShellSwitch;
+ private SwitchCompat mStayConnectedSwitch;
+ private SwitchCompat mCloseOnDisconnectSwitch;
+ private EditText mPostLoginAutomationField;
+ private Spinner mDelKeySpinner;
+ private Spinner mEncodingSpinner;
public static HostEditorFragment newInstance(HostBean existingHost) {
HostEditorFragment fragment = new HostEditorFragment();
@@ -128,12 +149,16 @@ public class HostEditorFragment extends Fragment {
View view = inflater.inflate(R.layout.fragment_host_editor, container, false);
mTransportSpinner = (Spinner) view.findViewById(R.id.transport_selector);
+ String[] transportNames = TransportFactory.getTransportNames();
ArrayAdapter<String> transportSelection = new ArrayAdapter<>(
- getActivity(),
- android.R.layout.simple_spinner_item,
- TransportFactory.getTransportNames());
+ getActivity(), android.R.layout.simple_spinner_item, transportNames);
transportSelection.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
mTransportSpinner.setAdapter(transportSelection);
+ for (int i = 0; i < transportNames.length; i++) {
+ if (transportNames.equals(mHost.getProtocol())) {
+ mTransportSpinner.setSelection(i);
+ }
+ }
mTransportSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
@@ -240,14 +265,10 @@ public class HostEditorFragment extends Fragment {
new HostTextFieldWatcher(HostDatabase.FIELD_HOST_NICKNAME));
mColorSelector = (Spinner) view.findViewById(R.id.color_selector);
- if (mHost.getColor() != null) {
- // Unfortunately, TypedArray doesn't have an indexOf(String) function, so search through
- // the array for the saved color.
- for (int i = 0; i < mColorValues.getIndexCount(); i++) {
- if (mHost.getColor().equals(mColorValues.getString(i))) {
- mColorSelector.setSelection(i);
- break;
- }
+ for (int i = 0; i < mColorValues.getIndexCount(); i++) {
+ if (mHost.getColor().equals(mColorValues.getString(i))) {
+ mColorSelector.setSelection(i);
+ break;
}
}
mColorSelector.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@@ -281,6 +302,88 @@ public class HostEditorFragment extends Fragment {
});
mFontSizeSeekBar.setProgress(mHost.getFontSize() - MINIMUM_FONT_SIZE);
+ mPubkeySpinner = (Spinner) view.findViewById(R.id.pubkey_spinner);
+ // TODO: Set up spinner. This requires passing pubkey data into the fragment from the
+ // activity and will be part of an upcoming PR.
+
+ mUseSshConfirmationContainer = view.findViewById(R.id.ssh_confirmation_container);
+ mUseSshAuthSwitch = (SwitchCompat) view.findViewById(R.id.use_ssh_auth_switch);
+ mSshAuthConfirmationCheckbox =
+ (AppCompatCheckBox) view.findViewById(R.id.ssh_auth_confirmation_checkbox);
+ CompoundButton.OnCheckedChangeListener authSwitchListener = new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ mUseSshConfirmationContainer.setVisibility(
+ mUseSshAuthSwitch.isChecked() ? View.VISIBLE : View.GONE);
+ if (mUseSshAuthSwitch.isChecked()) {
+ mHost.setUseAuthAgent(
+ mSshAuthConfirmationCheckbox.isChecked() ?
+ /* require confirmation */ mSshAuthValues.getString(1) :
+ /* don't require confirmation */ mSshAuthValues.getString(2));
+ } else {
+ mHost.setUseAuthAgent(/* don't use */ mSshAuthValues.getString(0));
+ }
+ }
+ };
+ mUseSshAuthSwitch.setOnCheckedChangeListener(authSwitchListener);
+ mSshAuthConfirmationCheckbox.setOnCheckedChangeListener(authSwitchListener);
+ if (mHost.getUseAuthAgent() == null ||
+ mHost.getUseAuthAgent().equals(mSshAuthValues.getString(0))) {
+ mUseSshAuthSwitch.setChecked(false);
+ mSshAuthConfirmationCheckbox.setChecked(false);
+ } else {
+ mUseSshAuthSwitch.setChecked(true);
+ mSshAuthConfirmationCheckbox.setChecked(
+ mHost.getUseAuthAgent().equals(mSshAuthValues.getString(1)));
+ }
+
+ mCompressionSwitch = (SwitchCompat) view.findViewById(R.id.compression_switch);
+ mCompressionSwitch.setChecked(mHost.getCompression());
+ mCompressionSwitch.setOnCheckedChangeListener(
+ new HostSwitchWatcher(HostDatabase.FIELD_HOST_COMPRESSION));
+
+ mStartShellSwitch = (SwitchCompat) view.findViewById(R.id.start_shell_switch);
+ mStartShellSwitch.setChecked(mHost.getWantSession());
+ mStartShellSwitch.setOnCheckedChangeListener(
+ new HostSwitchWatcher(HostDatabase.FIELD_HOST_WANTSESSION));
+
+ mStayConnectedSwitch = (SwitchCompat) view.findViewById(R.id.stay_connected_switch);
+ mStayConnectedSwitch.setChecked(mHost.getStayConnected());
+ mStayConnectedSwitch.setOnCheckedChangeListener(
+ new HostSwitchWatcher(HostDatabase.FIELD_HOST_STAYCONNECTED));
+
+ mCloseOnDisconnectSwitch = (SwitchCompat) view.findViewById(R.id.close_on_disconnect_switch);
+ mCloseOnDisconnectSwitch.setChecked(mHost.getQuickDisconnect());
+ mCloseOnDisconnectSwitch.setOnCheckedChangeListener(
+ new HostSwitchWatcher(HostDatabase.FIELD_HOST_QUICKDISCONNECT));
+
+ mPostLoginAutomationField = (EditText) view.findViewById(R.id.post_login_automation_field);
+ mPostLoginAutomationField.setText(mHost.getPostLogin());
+ mPostLoginAutomationField.addTextChangedListener(
+ new HostTextFieldWatcher(HostDatabase.FIELD_HOST_POSTLOGIN));
+
+ mDelKeySpinner = (Spinner) view.findViewById(R.id.del_key_spinner);
+ for (int i = 0; i < mDelKeyValues.getIndexCount(); i++) {
+ if (mHost.getDelKey().equals(mDelKeyValues.getString(i))) {
+ mDelKeySpinner.setSelection(i);
+ break;
+ }
+ }
+ mDelKeySpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+ @Override
+ public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+ mHost.setDelKey(mDelKeyValues.getString(position));
+ }
+
+ @Override
+ public void onNothingSelected(AdapterView<?> parent) {
+ }
+ });
+
+ mEncodingSpinner = (Spinner) view.findViewById(R.id.encoding_spinner);
+ // TODO: Set up spinner. This requires passing pubkey data into the fragment from the
+ // activity and will be part of an upcoming PR.
+
setUriPartsContainerExpanded(mIsUriEditorExpanded);
return view;
@@ -295,9 +398,11 @@ public class HostEditorFragment extends Fragment {
throw new ClassCastException(context.toString() + " must implement Listener");
}
- // Now that the fragment is attached to an Activity, fetch the array from the attached
+ // Now that the fragment is attached to an Activity, fetch the arrays from the attached
// Activity's resources.
mColorValues = getResources().obtainTypedArray(R.array.list_color_values);
+ mSshAuthValues = getResources().obtainTypedArray(R.array.list_authagent_values);
+ mDelKeyValues = getResources().obtainTypedArray(R.array.list_delkey_values);
}
@Override
@@ -305,6 +410,8 @@ public class HostEditorFragment extends Fragment {
super.onDetach();
mListener = null;
mColorValues.recycle();
+ mSshAuthValues.recycle();
+ mDelKeyValues.recycle();
}
@Override
@@ -392,6 +499,8 @@ public class HostEditorFragment extends Fragment {
}
} else if (HostDatabase.FIELD_HOST_NICKNAME.equals(mFieldType)) {
mHost.setNickname(text);
+ } else if (HostDatabase.FIELD_HOST_POSTLOGIN.equals(mFieldType)) {
+ mHost.setPostLogin(text);
} else {
throw new RuntimeException("Invalid field type.");
}
@@ -414,4 +523,28 @@ public class HostEditorFragment extends Fragment {
HostDatabase.FIELD_HOST_PORT.equals(fieldType);
}
}
+
+ private class HostSwitchWatcher implements CompoundButton.OnCheckedChangeListener {
+
+ private final String mFieldType;
+
+ public HostSwitchWatcher(String fieldType) {
+ mFieldType = fieldType;
+ }
+
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ if (HostDatabase.FIELD_HOST_COMPRESSION.equals(mFieldType)) {
+ mHost.setCompression(isChecked);
+ } else if (HostDatabase.FIELD_HOST_WANTSESSION.equals(mFieldType)) {
+ mHost.setWantSession(isChecked);
+ } else if (HostDatabase.FIELD_HOST_STAYCONNECTED.equals(mFieldType)) {
+ mHost.setStayConnected(isChecked);
+ } else if (HostDatabase.FIELD_HOST_QUICKDISCONNECT.equals(mFieldType)) {
+ mHost.setQuickDisconnect(isChecked);
+ } else {
+ throw new RuntimeException("Invalid field type.");
+ }
+ }
+ }
}
diff --git a/app/src/main/res/layout/fragment_host_editor.xml b/app/src/main/res/layout/fragment_host_editor.xml
index 6f429ac..cd27788 100644
--- a/app/src/main/res/layout/fragment_host_editor.xml
+++ b/app/src/main/res/layout/fragment_host_editor.xml
@@ -15,226 +15,462 @@
~ limitations under the License.
-->
-<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"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
tools:context="org.connectbot.HostEditorFragment"
- >
+ >
<LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical"
- android:layout_marginStart="4dp"
- android:layout_marginLeft="4dp"
- android:layout_marginBottom="4dp"
>
- <TextView
+ <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/protocol_spinner_label"
- android:textSize="12sp"
- />
+ android:orientation="vertical"
+ android:layout_marginStart="4dp"
+ android:layout_marginLeft="4dp"
+ android:layout_marginBottom="4dp"
+ >
- <Spinner
- android:id="@+id/transport_selector"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/protocol_spinner_label"
+ android:textSize="12sp"
+ />
- </LinearLayout>
+ <Spinner
+ android:id="@+id/transport_selector"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:animateLayoutChanges="true"
- tools:ignore="UnusedAttribute"
- >
+ </LinearLayout>
- <android.support.design.widget.TextInputLayout
- android:id="@+id/quickconnect_field_container"
- android:layout_width="0dp"
- android:layout_weight ="1"
- android:layout_height="wrap_content"
- >
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:animateLayoutChanges="true"
+ tools:ignore="UnusedAttribute"
+ >
+
+ <android.support.design.widget.TextInputLayout
+ android:id="@+id/quickconnect_field_container"
+ android:layout_width="0dp"
+ android:layout_weight ="1"
+ android:layout_height="wrap_content"
+ >
+
+ <EditText
+ android:id="@+id/quickconnect_field"
+ android:layout_width="match_parent"
+ android:layout_weight="1"
+ android:layout_height="wrap_content"
+ android:maxLines="1"
+ android:inputType="textNoSuggestions"
+ />
+
+ </android.support.design.widget.TextInputLayout>
+
+ <ImageButton
+ android:id="@+id/expand_collapse_button"
+ android:layout_width="16dp"
+ android:layout_height="16dp"
+ android:layout_gravity="center"
+ android:layout_margin="16dp"
+ android:src="@drawable/ic_expand_more"
+ android:contentDescription="@string/expand"
+ android:background="#00000000"
+ />
+
+ </LinearLayout>
- <EditText
- android:id="@+id/quickconnect_field"
+ <LinearLayout
+ android:id="@+id/uri_parts_container"
android:layout_width="match_parent"
- android:layout_weight="1"
android:layout_height="wrap_content"
- android:maxLines="1"
- android:inputType="textNoSuggestions"
- />
+ android:orientation="vertical"
+ android:layout_marginLeft="56dp"
+ android:layout_marginStart="56dp"
+ android:visibility="gone"
+ android:animateLayoutChanges="true"
+ tools:ignore="UnusedAttribute"
+ >
- </android.support.design.widget.TextInputLayout>
+ <android.support.design.widget.TextInputLayout
+ android:id="@+id/username_field_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ >
+
+ <EditText
+ android:id="@+id/username_edit_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/hostpref_username_title"
+ android:maxLines="1"
+ android:inputType="textNoSuggestions"
+ />
+
+ </android.support.design.widget.TextInputLayout>
+
+ <android.support.design.widget.TextInputLayout
+ android:id="@+id/hostname_field_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ >
+
+ <EditText
+ android:id="@+id/hostname_edit_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/hostpref_hostname_title"
+ android:maxLines="1"
+ android:inputType="textNoSuggestions"
+ />
+
+ </android.support.design.widget.TextInputLayout>
+
+ <android.support.design.widget.TextInputLayout
+ android:id="@+id/port_field_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ >
- <ImageButton
- android:id="@+id/expand_collapse_button"
- android:layout_width="16dp"
- android:layout_height="16dp"
- android:layout_gravity="center"
- android:layout_margin="16dp"
- android:src="@drawable/ic_expand_more"
- android:contentDescription="@string/expand"
- android:background="#00000000"
- />
+ <EditText
+ android:id="@+id/port_edit_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="number"
+ android:hint="@string/hostpref_port_title"
+ android:maxLines="1"
+ />
- </LinearLayout>
+ </android.support.design.widget.TextInputLayout>
- <LinearLayout
- android:id="@+id/uri_parts_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_marginLeft="56dp"
- android:layout_marginStart="56dp"
- android:visibility="gone"
- android:animateLayoutChanges="true"
- tools:ignore="UnusedAttribute"
- >
+ </LinearLayout>
+
+ <View style="@style/Divider"
+ />
<android.support.design.widget.TextInputLayout
- android:id="@+id/username_field_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
- <EditText
- android:id="@+id/username_edit_text"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="@string/hostpref_username_title"
- android:maxLines="1"
- android:inputType="textNoSuggestions"
- />
+ <EditText
+ android:id="@+id/nickname_field"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:maxLines="1"
+ android:inputType="text"
+ android:hint="@string/hostpref_nickname_title"
+ />
</android.support.design.widget.TextInputLayout>
- <android.support.design.widget.TextInputLayout
- android:id="@+id/hostname_field_container"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_marginStart="4dp"
+ android:layout_marginLeft="4dp"
+ android:layout_marginBottom="4dp"
>
- <EditText
- android:id="@+id/hostname_edit_text"
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_color_title"
+ android:textSize="12sp"
+ />
+
+ <Spinner
+ android:id="@+id/color_selector"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:entries="@array/list_colors"
+ android:entryValues="@array/list_color_values"
+ />
+
+ </LinearLayout>
+
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:hint="@string/hostpref_hostname_title"
- android:maxLines="1"
- android:inputType="textNoSuggestions"
+ android:orientation="vertical"
+ android:layout_marginStart="4dp"
+ android:layout_marginLeft="4dp"
+ android:layout_marginBottom="4dp"
+ >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ >
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_fontsize_title"
+ android:textSize="12sp"
+ />
+
+ <TextView
+ android:id="@+id/font_size_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="12sp"
+ />
+
+ </LinearLayout>
+
+ <SeekBar
+ android:id="@+id/font_size_bar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:max="32"
+ />
+
+ </LinearLayout>
+
+ <View style="@style/Divider"
/>
- </android.support.design.widget.TextInputLayout>
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_marginStart="4dp"
+ android:layout_marginLeft="4dp"
+ android:layout_marginBottom="4dp"
+ >
- <android.support.design.widget.TextInputLayout
- android:id="@+id/port_field_container"
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_pubkeyid_title"
+ android:textSize="12sp"
+ />
+
+ <Spinner
+ android:id="@+id/pubkey_spinner"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:entries="@array/list_pubkeyids"
+ android:entryValues="@array/list_pubkeyids_value"
+ />
+
+ </LinearLayout>
+
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:orientation="vertical"
>
- <EditText
- android:id="@+id/port_edit_text"
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ >
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_authagent_title"
+ />
+
+ <android.support.v7.widget.SwitchCompat
+ android:id="@+id/use_ssh_auth_switch"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ />
+
+ </RelativeLayout>
+
+ <RelativeLayout
+ android:id="@+id/ssh_confirmation_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ >
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_authagent_with_confirmation"
+ />
+
+ <android.support.v7.widget.AppCompatCheckBox
+ android:id="@+id/ssh_auth_confirmation_checkbox"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ />
+
+ </RelativeLayout>
+
+ </LinearLayout>
+
+ <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:inputType="number"
- android:hint="@string/hostpref_port_title"
- android:maxLines="1"
- />
+ >
- </android.support.design.widget.TextInputLayout>
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_compression_title"
+ />
- </LinearLayout>
+ <android.support.v7.widget.SwitchCompat
+ android:id="@+id/compression_switch"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ />
- <View style="@style/Divider"
- />
+ </RelativeLayout>
- <android.support.design.widget.TextInputLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- >
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ >
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_wantsession_title"
+ />
+
+ <android.support.v7.widget.SwitchCompat
+ android:id="@+id/start_shell_switch"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ />
- <EditText
- android:id="@+id/nickname_field"
+ </RelativeLayout>
+
+ <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:maxLines="1"
- android:inputType="text"
- android:hint="@string/hostpref_nickname_title"
- />
+ >
- </android.support.design.widget.TextInputLayout>
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_stayconnected_title"
+ />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_marginStart="4dp"
- android:layout_marginLeft="4dp"
- android:layout_marginBottom="4dp"
- >
+ <android.support.v7.widget.SwitchCompat
+ android:id="@+id/stay_connected_switch"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ />
- <TextView
- android:layout_width="wrap_content"
+ </RelativeLayout>
+
+ <RelativeLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/hostpref_color_title"
- android:textSize="12sp"
- />
+ >
- <Spinner
- android:id="@+id/color_selector"
- android:layout_width="wrap_content"
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_quickdisconnect_title"
+ />
+
+ <android.support.v7.widget.SwitchCompat
+ android:id="@+id/close_on_disconnect_switch"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ />
+
+ </RelativeLayout>
+
+ <RelativeLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:entries="@array/list_colors"
- android:entryValues="@array/list_color_values"
- />
+ >
- </LinearLayout>
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_postlogin_title"
+ />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_marginStart="4dp"
- android:layout_marginLeft="4dp"
- android:layout_marginBottom="4dp"
- >
+ <EditText
+ android:id="@+id/post_login_automation_field"
+ android:layout_height="wrap_content"
+ android:layout_width="fill_parent"
+ android:inputType="textMultiLine"
+ android:lines="8"
+ android:minLines="2"
+ />
+
+ </RelativeLayout>
<LinearLayout
- android:layout_width="match_parent"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_marginStart="4dp"
+ android:layout_marginLeft="4dp"
+ android:layout_marginBottom="4dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/hostpref_fontsize_title"
+ android:text="@string/hostpref_delkey_title"
android:textSize="12sp"
/>
- <TextView
- android:id="@+id/font_size_text"
+ <Spinner
+ android:id="@+id/del_key_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="12sp"
+ android:entries="@array/list_delkey"
+ android:entryValues="@array/list_delkey_values"
/>
</LinearLayout>
- <SeekBar
- android:id="@+id/font_size_bar"
- android:layout_width="match_parent"
+ <LinearLayout
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:max="32"
- />
+ android:orientation="vertical"
+ android:layout_marginStart="4dp"
+ android:layout_marginLeft="4dp"
+ android:layout_marginBottom="4dp"
+ >
- </LinearLayout>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_encoding_title"
+ android:textSize="12sp"
+ />
- <View style="@style/Divider"
- />
+ <Spinner
+ android:id="@+id/encoding_spinner"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ />
+
+ </LinearLayout>
+
+ </LinearLayout>
-</LinearLayout>
+</ScrollView> \ 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 9833a31..75213ba 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -596,5 +596,6 @@
<string name="protocol_spinner_label">Protocol</string>
<!-- Label for button which expands/collapses section. -->
<string name="expand">Expand</string>
+ <string name="hostpref_authagent_with_confirmation">require confirmation</string>
</resources>