ProfileList: Add indicator of profile connection state

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Samuel Holland 2017-07-31 21:29:29 -05:00
parent 0451370caf
commit 465a969a70
2 changed files with 12 additions and 0 deletions

View File

@ -20,6 +20,16 @@
android:layout_height="wrap_content"
android:text="@{item.name}" />
<TextView
style="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_toEndOf="@+id/profile_name"
android:text="@{item.isConnected ? @string/connected : @string/disconnected}"
android:textAlignment="textEnd"
android:textColor="@{item.isConnected ? @android:color/holo_green_dark : @android:color/holo_red_dark}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">WireGuard</string>
<string name="connected">Connected</string>
<string name="disconnected">Disconnected</string>
</resources>