aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/src/main/res/layout/tunnel_list_item.xml
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2023-03-25 23:58:06 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2023-03-25 23:58:06 +0100
commitf13624c58f0b8b46d3fd9958fe83f1631736cd45 (patch)
tree3112500a0ca64558b52903394b5d1f395c73df25 /ui/src/main/res/layout/tunnel_list_item.xml
parentui: bring back donation button (diff)
downloadwireguard-android-f13624c58f0b8b46d3fd9958fe83f1631736cd45.tar.xz
wireguard-android-f13624c58f0b8b46d3fd9958fe83f1631736cd45.zip
ui: switch from SwitchMaterial to MaterialSwitch
This required some weird changes to prevent clipping on the top, because apparently the new switch is a bit fatter. I think this actually looks a bit uglier than before, but it seems like that's what Material design wants. Maybe we can improve it? Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--ui/src/main/res/layout/tunnel_list_item.xml7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/src/main/res/layout/tunnel_list_item.xml b/ui/src/main/res/layout/tunnel_list_item.xml
index 9c9517a7..57690e5e 100644
--- a/ui/src/main/res/layout/tunnel_list_item.xml
+++ b/ui/src/main/res/layout/tunnel_list_item.xml
@@ -34,7 +34,8 @@
android:descendantFocusability="beforeDescendants"
android:focusable="true"
android:nextFocusRight="@+id/tunnel_switch"
- android:padding="16dp">
+ android:paddingHorizontal="16dp"
+ android:paddingVertical="8dp">
<TextView
android:id="@+id/tunnel_name"
@@ -42,7 +43,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
- android:layout_alignParentTop="true"
+ android:layout_centerVertical="true"
android:ellipsize="end"
android:maxLines="1"
android:text="@{key}"
@@ -52,7 +53,7 @@
android:id="@+id/tunnel_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignBaseline="@+id/tunnel_name"
+ android:layout_centerVertical="true"
android:layout_alignParentEnd="true"
android:nextFocusLeft="@+id/tunnel_list_item"
app:checked="@{item.state == State.UP}"