diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SwitchSettingViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SwitchSettingViewHolder.java index 9364f1e3eb..ea7185b2ec 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SwitchSettingViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SwitchSettingViewHolder.java @@ -33,6 +33,15 @@ public final class SwitchSettingViewHolder extends SettingViewHolder mBinding.settingSwitch.setChecked(mItem.isChecked(getAdapter().getSettings())); + mBinding.settingSwitch.setEnabled(mItem.isEditable()); + + mBinding.settingSwitch.setOnCheckedChangeListener((buttonView, isChecked) -> + { + getAdapter().onBooleanClick(mItem, mBinding.settingSwitch.isChecked()); + + setStyle(mBinding.textSettingName, mItem); + }); + setStyle(mBinding.textSettingName, mItem); } @@ -46,10 +55,6 @@ public final class SwitchSettingViewHolder extends SettingViewHolder } mBinding.settingSwitch.toggle(); - - getAdapter().onBooleanClick(mItem, mBinding.settingSwitch.isChecked()); - - setStyle(mBinding.textSettingName, mItem); } @Nullable @Override diff --git a/Source/Android/app/src/main/res/layout/list_item_setting_switch.xml b/Source/Android/app/src/main/res/layout/list_item_setting_switch.xml index aab0408c7b..9613a7337f 100644 --- a/Source/Android/app/src/main/res/layout/list_item_setting_switch.xml +++ b/Source/Android/app/src/main/res/layout/list_item_setting_switch.xml @@ -44,7 +44,6 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:layout_marginEnd="24dp" - android:clickable="false" android:focusable="false" android:minHeight="0dp" android:minWidth="0dp" />