From 2cc7f6c2ea852f5b51b7022242833e6e92ce79fe Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 27 Nov 2017 04:35:04 +0100 Subject: ConfigDetailFragment: wire up toggle switch Finally no gross colors. Signed-off-by: Jason A. Donenfeld --- app/src/main/res/layout/config_detail_fragment.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/config_detail_fragment.xml b/app/src/main/res/layout/config_detail_fragment.xml index 206263dc..f5cd2acb 100644 --- a/app/src/main/res/layout/config_detail_fragment.xml +++ b/app/src/main/res/layout/config_detail_fragment.xml @@ -5,6 +5,8 @@ + + @@ -39,19 +41,17 @@ android:layout_alignParentStart="true" android:layout_alignParentTop="true" android:layout_marginBottom="8dp" + android:layout_toStartOf="@+id/config_switch" android:text="@string/status" /> - + app:checked="@{config.enabled}" + app:onBeforeCheckedChanged="@{(v, checked) -> checked ? VpnService.instance.enable(config.name) : VpnService.instance.disable(config.name)}" />