aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Klein <jklein24@gmail.com>2015-10-21 14:26:30 -0700
committerJeremy Klein <jklein24@gmail.com>2015-10-21 14:26:30 -0700
commitdb30220b9f03a57005b8bfc5b1b0b389b93e08e5 (patch)
treeb4ca0b9684df379f635f116ced83c36d6ba8e515
parent995a77438cdbd66fd27087144f856c7d0bbb2dfa (diff)
parent23f041015931cfc7acd440969b805e2009466e2b (diff)
downloadconnectbot-db30220b9f03a57005b8bfc5b1b0b389b93e08e5.tar.gz
connectbot-db30220b9f03a57005b8bfc5b1b0b389b93e08e5.tar.bz2
connectbot-db30220b9f03a57005b8bfc5b1b0b389b93e08e5.zip
Merge pull request #308 from rhansby/fix-list-font-size
Style port forward and pubkey list like the host list.
-rw-r--r--app/src/main/res/layout/item_host.xml6
-rw-r--r--app/src/main/res/layout/item_portforward.xml32
-rw-r--r--app/src/main/res/layout/item_pubkey.xml58
3 files changed, 55 insertions, 41 deletions
diff --git a/app/src/main/res/layout/item_host.xml b/app/src/main/res/layout/item_host.xml
index 6059393..0ea220e 100644
--- a/app/src/main/res/layout/item_host.xml
+++ b/app/src/main/res/layout/item_host.xml
@@ -30,13 +30,9 @@
android:id="@android:id/icon"
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_connected"
android:src="@drawable/connected"
+ style="@style/ListItemIcon"
/>
<LinearLayout
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..1fb4cae 100644
--- a/app/src/main/res/layout/item_pubkey.xml
+++ b/app/src/main/res/layout/item_pubkey.xml
@@ -21,38 +21,54 @@
<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_centerVertical="true"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
android:contentDescription="@string/image_description_key_is_locked"
- android:src="@drawable/pubkey"/>
+ android:src="@drawable/pubkey"
+ style="@style/ListItemIcon"/>
- <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>