diff options
author | Samuel Holland <samuel@sholland.org> | 2018-01-01 02:06:37 -0600 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2018-01-06 04:09:29 -0600 |
commit | 609194fae2332e6f2ccd7a4464bfa492ad661a6f (patch) | |
tree | 96a7cd9846a093dfcdacfef285b0a4d77000edf0 /app/src/main/res/layout/tunnel_detail_peer.xml | |
parent | 4c0869393e2d8f52b9bcf312286dca8ced2e1900 (diff) |
Serviceless rewrite, part 1
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'app/src/main/res/layout/tunnel_detail_peer.xml')
-rw-r--r-- | app/src/main/res/layout/tunnel_detail_peer.xml | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/app/src/main/res/layout/tunnel_detail_peer.xml b/app/src/main/res/layout/tunnel_detail_peer.xml new file mode 100644 index 00000000..0de72dea --- /dev/null +++ b/app/src/main/res/layout/tunnel_detail_peer.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="utf-8"?> +<layout xmlns:android="http://schemas.android.com/apk/res/android"> + + <data> + + <variable + name="collection" + type="android.databinding.ObservableList<com.wireguard.config.Peer>" /> + + <variable + name="item" + type="com.wireguard.config.Peer" /> + </data> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="4dp" + android:layout_marginEnd="8dp" + android:layout_marginStart="8dp" + android:layout_marginTop="4dp" + android:background="?android:attr/colorBackground" + android:elevation="2dp" + android:padding="8dp"> + + <TextView + android:id="@+id/peer_title" + style="?android:attr/textAppearanceMedium" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:text="@string/peer" /> + + <TextView + android:id="@+id/public_key_label" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/peer_title" + android:layout_marginTop="8dp" + android:labelFor="@+id/public_key_text" + android:text="@string/public_key" /> + + <TextView + android:id="@+id/public_key_text" + style="?android:attr/textAppearanceMedium" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@+id/public_key_label" + android:ellipsize="end" + android:maxLines="1" + android:text="@{item.publicKey}" /> + + <TextView + android:id="@+id/allowed_ips_label" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@+id/public_key_text" + android:layout_marginTop="8dp" + android:labelFor="@+id/allowed_ips_text" + android:text="@string/allowed_ips" /> + + <TextView + android:id="@+id/allowed_ips_text" + style="?android:attr/textAppearanceMedium" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@+id/allowed_ips_label" + android:text="@{item.allowedIPs}" /> + + <TextView + android:id="@+id/endpoint_label" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@+id/allowed_ips_text" + android:layout_marginTop="8dp" + android:labelFor="@+id/endpoint_text" + android:text="@string/endpoint" /> + + <TextView + android:id="@+id/endpoint_text" + style="?android:attr/textAppearanceMedium" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@+id/endpoint_label" + android:text="@{item.endpoint}" /> + </RelativeLayout> +</layout> |