aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Hansberry <hansberry@google.com>2015-10-20 15:45:55 -0700
committerRyan Hansberry <hansberry@google.com>2015-10-21 14:16:46 -0700
commit9c9c1029ffe1de58bbd63b57965e2b0274d89f8d (patch)
tree2f0440c4cfe91e43e957ead975e9c86013f0dfc1
parent995a77438cdbd66fd27087144f856c7d0bbb2dfa (diff)
downloadconnectbot-9c9c1029ffe1de58bbd63b57965e2b0274d89f8d.tar.gz
connectbot-9c9c1029ffe1de58bbd63b57965e2b0274d89f8d.tar.bz2
connectbot-9c9c1029ffe1de58bbd63b57965e2b0274d89f8d.zip
Style port forward and pubkey list like the host list.
-rw-r--r--app/src/main/res/layout/item_portforward.xml32
-rw-r--r--app/src/main/res/layout/item_pubkey.xml59
2 files changed, 57 insertions, 34 deletions
diff --git a/app/src/main/res/layout/item_portforward.xml b/app/src/main/res/layout/item_portforward.xml
index f2214a7..a3b2e52 100644
--- a/app/src/main/res/layout/item_portforward.xml
+++ b/app/src/main/res/layout/item_portforward.xml
@@ -18,32 +18,34 @@
*/
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:gravity="start|center_vertical"
+ android:minHeight="72dp"
+ android:layout_centerVertical="true"
android:orientation="vertical"
- android:padding="10dip"
- >
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ style="@style/SelectableItem">
<TextView
android:id="@android:id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true"
- android:text="Tunnel Nickname"
- android:textAppearance="?android:attr/textAppearanceLarge"
- />
+ android:ellipsize="end"
+ android:paddingTop="20dp"
+ android:singleLine="true"
+ android:textAppearance="@style/ListItemFirstLineText"
+ tools:text="Tunnel Nickname"/>
<TextView
android:id="@android:id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@android:id/text1"
- android:text="Local port 8080 to 192.168.1.1:80"
- android:textAppearance="?android:attr/textAppearanceSmall"
- />
+ android:paddingBottom="20dp"
+ android:textAppearance="@style/ListItemSecondLineText"
+ tools:text="Local port 8080 to 192.168.1.1:80"/>
-</RelativeLayout>
+</LinearLayout>
diff --git a/app/src/main/res/layout/item_pubkey.xml b/app/src/main/res/layout/item_pubkey.xml
index 6f63af9..565d099 100644
--- a/app/src/main/res/layout/item_pubkey.xml
+++ b/app/src/main/res/layout/item_pubkey.xml
@@ -21,38 +21,59 @@
<RelativeLayout
android:id="@android:id/content"
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:padding="10dip">
+ android:minHeight="72dp"
+ style="@style/SelectableItem">
<ImageView
android:id="@android:id/icon"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_alignParentEnd="true"
- android:layout_alignParentRight="true"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
+ android:layout_marginStart="16dp"
+ android:layout_marginLeft="16dp"
android:contentDescription="@string/image_description_key_is_locked"
android:src="@drawable/pubkey"/>
+ />
- <TextView
- android:id="@android:id/text1"
+ <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
- android:layout_toLeftOf="@android:id/icon1"
- android:bufferType="normal"
- android:text="Key Example"
- android:textAppearance="?android:attr/textAppearanceLarge"/>
+ android:layout_alignWithParentIfMissing="true"
+ android:layout_centerVertical="true"
+ android:layout_marginEnd="16dp"
+ android:layout_marginLeft="72dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginStart="72dp"
+ android:layout_toRightOf="@android:id/icon"
+ android:layout_toEndOf="@android:id/icon"
+ android:orientation="vertical"
+ >
- <TextView
- android:id="@android:id/text2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@android:id/text1"
- android:text="DSA 1024-bit"
- android:textAppearance="?android:attr/textAppearanceSmall"
- />
+ <TextView
+ android:id="@android:id/text1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:paddingTop="20dp"
+ android:singleLine="true"
+ android:textAppearance="@style/ListItemFirstLineText"
+ tools:text="Key Example"/>
+
+ <TextView
+ android:id="@android:id/text2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingBottom="20dp"
+ android:textAppearance="@style/ListItemSecondLineText"
+ tools:text="DSA 1024-bit"/>
+
+ </LinearLayout>
</RelativeLayout>