diff options
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/config_list_item.xml | 9 |
1 files changed, 5 insertions, 4 deletions
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 @@ <?xml version="1.0" encoding="utf-8"?> -<layout xmlns:android="http://schemas.android.com/apk/res/android"> +<layout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> <data> @@ -35,13 +36,13 @@ android:text="@{key}" android:textStyle="@{item.primary ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT}" /> - <Switch + <com.wireguard.android.widgets.ToggleSwitch android:id="@+id/config_switch" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/config_name" android:layout_alignParentEnd="true" - android:checked="@{item.enabled}" - android:onCheckedChanged="@{(v, checked) -> checked ? VpnService.instance.enable(item.name) : VpnService.instance.disable(item.name)}" /> + app:checked="@{item.enabled}" + app:onBeforeCheckedChanged="@{(v, checked) -> checked ? VpnService.instance.enable(item.name) : VpnService.instance.disable(item.name)}" /> </RelativeLayout> </layout> |