diff options
author | Jeremy Klein <jklein24@gmail.com> | 2015-10-06 11:58:38 -0700 |
---|---|---|
committer | Jeremy Klein <jklein24@gmail.com> | 2015-10-06 11:58:38 -0700 |
commit | 049ffdd646df63c9a705db0ad8b6ce24c6a76775 (patch) | |
tree | c4363a929f9fa872e1972e632c907d3135cdf867 /app/src/main/res | |
parent | 14318dab67d7c013b1a88861367eecb423010e70 (diff) | |
parent | 0a41d6587a4bcea300a9a0f9893f1eeaf6c15af5 (diff) | |
download | connectbot-049ffdd646df63c9a705db0ad8b6ce24c6a76775.tar.gz connectbot-049ffdd646df63c9a705db0ad8b6ce24c6a76775.tar.bz2 connectbot-049ffdd646df63c9a705db0ad8b6ce24c6a76775.zip |
Merge pull request #273 from khorimoto/edit-host-connection
Add/edit host view: add fields for the connection-related preferences.
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/fragment_host_editor.xml | 524 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 2 |
2 files changed, 385 insertions, 141 deletions
diff --git a/app/src/main/res/layout/fragment_host_editor.xml b/app/src/main/res/layout/fragment_host_editor.xml index 6f429ac..5e809d8 100644 --- a/app/src/main/res/layout/fragment_host_editor.xml +++ b/app/src/main/res/layout/fragment_host_editor.xml @@ -15,226 +15,468 @@ ~ 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" + android:layout_height="wrap_content" tools:context="org.connectbot.HostEditorFragment" - > + > <LinearLayout - android:layout_width="wrap_content" + 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" > - <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" + /> - <EditText - android:id="@+id/quickconnect_field" + </LinearLayout> + + <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: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" + > - </android.support.design.widget.TextInputLayout> + <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" + /> - <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" - /> + </android.support.design.widget.TextInputLayout> - </LinearLayout> + </LinearLayout> - <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" - > + <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" + android:layout_alignParentEnd="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" + android:layout_alignParentEnd="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" + android:layout_alignParentEnd="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" + android:layout_alignParentEnd="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" - /> + > + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/hostpref_stayconnected_title" + /> - </android.support.design.widget.TextInputLayout> + <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" + android:layout_alignParentEnd="true" + /> - <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" - > + </RelativeLayout> - <TextView - android:layout_width="wrap_content" + <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" + android:layout_alignParentEnd="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..a0dc643 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -596,5 +596,7 @@ <string name="protocol_spinner_label">Protocol</string> <!-- Label for button which expands/collapses section. --> <string name="expand">Expand</string> + <!-- Label for checkbox which, when check, makes SSL authorization require confirmation. --> + <string name="hostpref_authagent_with_confirmation">require confirmation</string> </resources> |