diff options
author | Samuel Holland <samuel@sholland.org> | 2017-07-31 21:29:29 -0500 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2017-07-31 21:29:29 -0500 |
commit | 465a969a700017ae0b8fd8997ec805299bc3b6b5 (patch) | |
tree | d37cef1b5feec78996da6931f3f02aeadd8cd9df /app/src/main/res | |
parent | 0451370caffa5e1fd70d50a842abdf58a63c7107 (diff) |
ProfileList: Add indicator of profile connection state
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/profile_list_item.xml | 10 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/app/src/main/res/layout/profile_list_item.xml b/app/src/main/res/layout/profile_list_item.xml index aeafaf0f..97b7273f 100644 --- a/app/src/main/res/layout/profile_list_item.xml +++ b/app/src/main/res/layout/profile_list_item.xml @@ -21,6 +21,16 @@ 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" android:layout_below="@+id/profile_name" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a5614249..8debebf8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -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> |