diff options
author | Kyle Horimoto <khorimoto@gmail.com> | 2015-10-20 18:18:47 -0700 |
---|---|---|
committer | Kyle Horimoto <khorimoto@gmail.com> | 2015-10-21 12:18:22 -0700 |
commit | 4caf205c1abfd17dc4c605ec579df23df8f72d0e (patch) | |
tree | 91a9b7ace1a011ec2755b0aff4d26875f960ff39 /app | |
parent | d57ab6f788707defad29df2432eafe1bc4dd4e79 (diff) | |
download | connectbot-4caf205c1abfd17dc4c605ec579df23df8f72d0e.tar.gz connectbot-4caf205c1abfd17dc4c605ec579df23df8f72d0e.tar.bz2 connectbot-4caf205c1abfd17dc4c605ec579df23df8f72d0e.zip |
Lint and jlklein comments.
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/org/connectbot/HostEditorFragment.java | 3 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_host_editor.xml | 34 | ||||
-rw-r--r-- | app/src/main/res/values/dimens.xml | 23 | ||||
-rw-r--r-- | app/src/main/res/values/styles.xml | 18 |
4 files changed, 57 insertions, 21 deletions
diff --git a/app/src/main/java/org/connectbot/HostEditorFragment.java b/app/src/main/java/org/connectbot/HostEditorFragment.java index 2a6514e..fe6f838 100644 --- a/app/src/main/java/org/connectbot/HostEditorFragment.java +++ b/app/src/main/java/org/connectbot/HostEditorFragment.java @@ -38,13 +38,10 @@ import android.view.LayoutInflater; import android.view.MenuItem; 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.TextView; import org.connectbot.bean.HostBean; diff --git a/app/src/main/res/layout/fragment_host_editor.xml b/app/src/main/res/layout/fragment_host_editor.xml index 20d835d..e4a2094 100644 --- a/app/src/main/res/layout/fragment_host_editor.xml +++ b/app/src/main/res/layout/fragment_host_editor.xml @@ -40,6 +40,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/icon" + android:contentDescription="@string/protocol_spinner_label" style="@style/ListItemIcon" /> @@ -206,6 +207,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/icon" + android:contentDescription="@string/hostpref_color_title" style="@style/ListItemIcon" /> @@ -237,6 +239,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/icon" + android:contentDescription="@string/hostpref_fontsize_title" style="@style/ListItemIcon" /> @@ -270,9 +273,9 @@ android:id="@+id/font_size_text" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentRight="true" android:layout_gravity="center_vertical" android:layout_marginRight="16dp" + android:layout_marginEnd="16dp" android:inputType="number" android:maxLines="1" tools:text="10" @@ -292,6 +295,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/icon" + android:contentDescription="@string/hostpref_pubkeyid_title" style="@style/ListItemIcon" /> @@ -324,6 +328,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/icon" + android:contentDescription="@string/hostpref_delkey_title" style="@style/ListItemIcon" /> @@ -356,6 +361,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/icon" + android:contentDescription="@string/hostpref_encoding_title" style="@style/ListItemIcon" /> @@ -394,17 +400,10 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/icon" + android:contentDescription="@string/hostpref_authagent_title" style="@style/ListItemIcon" /> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/hostpref_authagent_title" - android:paddingBottom="24dp" - style="@style/ListItemFirstLineText.WithIcon" - /> - <android.support.v7.widget.SwitchCompat android:id="@+id/use_ssh_auth_switch" android:layout_width="wrap_content" @@ -416,6 +415,17 @@ android:layout_centerVertical="true" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toLeftOf="@id/use_ssh_auth_switch" + android:layout_toStartOf="@id/use_ssh_auth_switch" + android:text="@string/hostpref_authagent_title" + android:paddingBottom="24dp" + style="@style/ListItemFirstLineText.WithIcon" + tools:ignore="RelativeOverlap" + /> + </RelativeLayout> <RelativeLayout @@ -432,6 +442,7 @@ android:textSize="14sp" android:layout_marginTop="8dp" android:layout_marginLeft="72dp" + android:layout_marginStart="72dp" /> <android.support.v7.widget.AppCompatCheckBox @@ -457,6 +468,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/icon" + android:contentDescription="@string/hostpref_compression_title" style="@style/ListItemIcon" /> @@ -501,6 +513,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/icon" + android:contentDescription="@string/hostpref_wantsession_title" style="@style/ListItemIcon" /> @@ -545,6 +558,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/icon" + android:contentDescription="@string/hostpref_stayconnected_title" style="@style/ListItemIcon" /> @@ -589,6 +603,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/icon" + android:contentDescription="@string/hostpref_quickdisconnect_title" style="@style/ListItemIcon" /> @@ -633,6 +648,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/icon" + android:contentDescription="@string/hostpref_postlogin_title" style="@style/ListItemIcon" /> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000..1889eb4 --- /dev/null +++ b/app/src/main/res/values/dimens.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ ConnectBot: simple, powerful, open-source SSH client for Android + ~ Copyright 2015 Kenny Root, Jeffrey Sharkey + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<resources> + <dimen name="list_item_text_margin_left">72dp</dimen> + <dimen name="list_item_left_right_padding">16dp</dimen> + <dimen name="list_item_top_bottom_padding">20dp</dimen> +</resources> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 12aea8e..93bf690 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -37,8 +37,8 @@ </style> <style name="ListItemIcon"> - <item name="android:layout_marginLeft">16dp</item> - <item name="android:layout_marginStart" tools:ignore="NewApi">16dp</item> + <item name="android:layout_marginLeft">@dimen/list_item_left_right_padding</item> + <item name="android:layout_marginStart" tools:ignore="NewApi">@dimen/list_item_left_right_padding</item> <item name="android:layout_centerVertical">true</item> <item name="android:layout_alignParentLeft">true</item> <item name="android:layout_alignParentStart" tools:ignore="NewApi">true</item> @@ -47,27 +47,27 @@ <style name="ListItemFirstLineText"> <item name="android:layout_alignParentTop">true</item> <item name="android:textColor">?android:textColorPrimary</item> - <item name="android:textSize">16sp</item> - <item name="android:paddingTop">20dp</item> + <item name="android:textSize">@dimen/list_item_left_right_padding</item> + <item name="android:paddingTop">@dimen/list_item_top_bottom_padding</item> <item name="android:layout_alignParentLeft">true</item> </style> <style name="ListItemFirstLineText.WithIcon" parent="ListItemFirstLineText"> - <item name="android:layout_marginLeft">72dp</item> - <item name="android:layout_marginStart" tools:ignore="NewApi">72dp</item> + <item name="android:layout_marginLeft">@dimen/list_item_text_margin_left</item> + <item name="android:layout_marginStart" tools:ignore="NewApi">@dimen/list_item_text_margin_left</item> </style> <style name="ListItemSecondLineText"> <item name="android:layout_alignParentBottom">true</item> <item name="android:textColor">?android:textColorSecondary</item> <item name="android:textSize">14sp</item> - <item name="android:paddingBottom">20dp</item> + <item name="android:paddingBottom">@dimen/list_item_top_bottom_padding</item> <item name="android:layout_alignParentLeft">true</item> </style> <style name="ListItemSecondLineText.WithIcon" parent="ListItemSecondLineText"> - <item name="android:layout_marginLeft">72dp</item> - <item name="android:layout_marginStart" tools:ignore="NewApi">72dp</item> + <item name="android:layout_marginLeft">@dimen/list_item_text_margin_left</item> + <item name="android:layout_marginStart" tools:ignore="NewApi">@dimen/list_item_text_margin_left</item> </style> <style name="ListItemFirstLineText.Red" parent="ListItemFirstLineText"> |