From 283340f5dcd74f8a6fc3545f567cf1c2f6256318 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sat, 25 Nov 2017 23:05:39 -0600 Subject: ConfigList: A better toggle switch Signed-off-by: Jason A. Donenfeld --- app/src/main/res/layout/config_list_item.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/config_list_item.xml b/app/src/main/res/layout/config_list_item.xml index 87380dee..207f95ef 100644 --- a/app/src/main/res/layout/config_list_item.xml +++ b/app/src/main/res/layout/config_list_item.xml @@ -1,5 +1,6 @@ - + @@ -35,13 +36,13 @@ android:text="@{key}" android:textStyle="@{item.primary ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT}" /> - + app:checked="@{item.enabled}" + app:onBeforeCheckedChanged="@{(v, checked) -> checked ? VpnService.instance.enable(item.name) : VpnService.instance.disable(item.name)}" /> -- cgit v1.2.3