aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2015-09-04 14:29:34 -0700
committerKenny Root <kenny@the-b.org>2015-09-04 14:29:34 -0700
commitfb57d4914a56a7bbe8606761958a4f51946f0d9c (patch)
tree09a011326d0583120e543ab49bac80cfb2ac208e
parentcea778bec3db47913567660a17185c3e61bd1df2 (diff)
parentecf0d1459a1544e989774fd9ddab32138905f28e (diff)
downloadconnectbot-fb57d4914a56a7bbe8606761958a4f51946f0d9c.tar.gz
connectbot-fb57d4914a56a7bbe8606761958a4f51946f0d9c.tar.bz2
connectbot-fb57d4914a56a7bbe8606761958a4f51946f0d9c.zip
Merge pull request #185 from khorimoto/host-list-item
Style the host list items with material design.
-rw-r--r--app/src/main/res/layout-land/item_host.xml65
-rw-r--r--app/src/main/res/layout-port/item_host.xml57
-rw-r--r--app/src/main/res/layout/item_host.xml76
-rw-r--r--app/src/main/res/values/styles.xml10
4 files changed, 85 insertions, 123 deletions
diff --git a/app/src/main/res/layout-land/item_host.xml b/app/src/main/res/layout-land/item_host.xml
deleted file mode 100644
index cbccd91..0000000
--- a/app/src/main/res/layout-land/item_host.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * ConnectBot: simple, powerful, open-source SSH client for Android
- * Copyright 2007 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.
- */
--->
-
-<RelativeLayout
- android:id="@android:id/content"
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:padding="10dip"
- >
-
- <ImageView
- android:id="@android:id/icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:contentDescription="@string/image_description_connected"
- android:paddingTop="5dip"
- android:src="@drawable/connected"
- />
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- >
-
- <TextView
- android:id="@android:id/text1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceLarge"
- />
-
- <TextView
- android:id="@android:id/text2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="10dip"
- android:textAppearance="?android:attr/textAppearanceSmall"
- />
-
-
- </LinearLayout>
-
-</RelativeLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout-port/item_host.xml b/app/src/main/res/layout-port/item_host.xml
deleted file mode 100644
index 7ee7f0a..0000000
--- a/app/src/main/res/layout-port/item_host.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * ConnectBot: simple, powerful, open-source SSH client for Android
- * Copyright 2007 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.
- */
--->
-
-<RelativeLayout android:id="@android:id/content"
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:padding="10dip"
- >
-
- <ImageView
- android:id="@android:id/icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:contentDescription="@string/image_description_connected"
- android:paddingTop="5dip"
- android:src="@drawable/connected"
- />
-
- <TextView
- android:id="@android:id/text1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:paddingRight="20dip"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceLarge"
- />
-
- <TextView
- android:id="@android:id/text2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@android:id/text1"
- android:textAppearance="?android:attr/textAppearanceSmall"
- />
-
-
-</RelativeLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_host.xml b/app/src/main/res/layout/item_host.xml
new file mode 100644
index 0000000..56c3d34
--- /dev/null
+++ b/app/src/main/res/layout/item_host.xml
@@ -0,0 +1,76 @@
+<?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.
+ -->
+
+<RelativeLayout
+ android:id="@android:id/content"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="72dp"
+ >
+
+ <ImageView
+ android:id="@android:id/icon"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:layout_marginEnd="16dp"
+ android:layout_marginRight="16dp"
+ android:contentDescription="@string/image_description_connected"
+ android:src="@drawable/connected"
+ />
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_centerVertical="true"
+ android:layout_marginStart="16dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_marginRight="16dp"
+ android:orientation="vertical"
+ android:layout_toStartOf="@android:id/icon"
+ android:layout_toLeftOf="@android:id/icon"
+ >
+
+ <TextView
+ android:id="@android:id/text1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:paddingTop="20dp"
+ android:textAppearance="@style/ListItemFirstLineText"
+ />
+
+ <TextView
+ android:id="@android:id/text2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingBottom="20dp"
+ android:textAppearance="@style/ListItemSecondLineText"
+ />
+
+ </LinearLayout>
+
+</RelativeLayout>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 031d358..593af85 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -27,9 +27,17 @@
<item name="android:textSize">10sp</item>
</style>
-
<style name="KeyboardButton" parent="KeyboardKey">
<item name="android:background">@drawable/keyboard_button_selector</item>
</style>
+ <style name="ListItemFirstLineText" parent="TextAppearance.AppCompat">
+ <item name="android:textColor">?android:textColorPrimary</item>
+ <item name="android:textSize">16sp</item>
+ </style>
+
+ <style name="ListItemSecondLineText" parent="TextAppearance.AppCompat">
+ <item name="android:textColor">?android:textColorSecondary</item>
+ <item name="android:textSize">14sp</item>
+ </style>
</resources>