From 77b5937fbb8490b368acac85f434113a175f1bba Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 6 Apr 2020 18:09:03 -0600 Subject: ui: add missing fields to detail view Signed-off-by: Jason A. Donenfeld --- ui/src/main/res/layout/tunnel_detail_peer.xml | 66 +++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 3 deletions(-) (limited to 'ui/src/main/res/layout/tunnel_detail_peer.xml') diff --git a/ui/src/main/res/layout/tunnel_detail_peer.xml b/ui/src/main/res/layout/tunnel_detail_peer.xml index a73716d7..d0de329b 100644 --- a/ui/src/main/res/layout/tunnel_detail_peer.xml +++ b/ui/src/main/res/layout/tunnel_detail_peer.xml @@ -45,7 +45,7 @@ style="@style/DetailText" android:layout_width="match_parent" android:layout_height="wrap_content" - android:contentDescription="@string/public_key_description" + android:contentDescription="@string/public_key" android:ellipsize="end" android:maxLines="1" android:onClick="@{ClipboardUtils::copyTextView}" @@ -55,6 +55,32 @@ app:layout_constraintTop_toBottomOf="@+id/public_key_label" tools:text="wOs2eguFEohqIZxlSJ1CAT9584tc6ejj9hfGFsoBVkA=" /> + + + + + app:layout_constraintTop_toBottomOf="@+id/pre_shared_key_text" /> @@ -82,6 +112,7 @@ android:layout_marginTop="8dp" android:labelFor="@+id/endpoint_text" android:text="@string/endpoint" + android:visibility="@{item.endpoint.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/allowed_ips_text" /> @@ -90,11 +121,38 @@ style="@style/DetailText" android:layout_width="match_parent" android:layout_height="wrap_content" + android:contentDescription="@string/endpoint" + android:onClick="@{ClipboardUtils::copyTextView}" android:text="@{item.endpoint}" + android:visibility="@{item.endpoint.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/endpoint_label" tools:text="192.168.0.1:51820" /> + + + +