From: InHong Han Date: Thu, 13 Oct 2022 02:30:33 +0000 (+0900) Subject: Modified to change the setting value whenever the switch item is clicked X-Git-Tag: accepted/tizen/unified/20221013.130853^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4cb74df76deb8f1fbc40dde17e74a8045911613d;p=profile%2Fiot%2Fapps%2Fdotnet%2Fsetting-inputmethod.git Modified to change the setting value whenever the switch item is clicked Change-Id: I018391da1395c3797fa4cd8b4bef0043a8736411 --- diff --git a/Settings/SettingInputmethod/SettingItem.cs b/Settings/SettingInputmethod/SettingItem.cs index bb09dde..4c55279 100644 --- a/Settings/SettingInputmethod/SettingItem.cs +++ b/Settings/SettingInputmethod/SettingItem.cs @@ -91,9 +91,9 @@ namespace SettingInputmethod toggle.IsSelected = selected; } - public void SetSwitchEnabled(bool enalbed) + public void SetSwitchEnabled(bool enabled) { - toggle.IsEnabled = enalbed; + toggle.IsEnabled = enabled; } } } diff --git a/Settings/SettingInputmethod/SettingWidgetInputmethod.cs b/Settings/SettingInputmethod/SettingWidgetInputmethod.cs index 04921e0..8123d43 100644 --- a/Settings/SettingInputmethod/SettingWidgetInputmethod.cs +++ b/Settings/SettingInputmethod/SettingWidgetInputmethod.cs @@ -59,6 +59,7 @@ namespace SettingInputmethod SettingItem imeItem = new SettingItem(ImeInfo.label); imeItem.ID = ImeInfo.appId; + imeItem.SetClickEventHandler(OnItemClicked); imeItem.SetSwitchEventHandler(OnSwitchClicked); imeItem.SetSwitchSelected(ImeInfo.enabled); if (ImeInfo.preinstalled || string.Compare(GetDefaultIse(), ImeInfo.appId, false) == 0) @@ -141,6 +142,9 @@ namespace SettingInputmethod IsfControlOpenImeOptionWindow(); break; default: + DefaultLinearItem defaultLinearItem = (DefaultLinearItem)sender; + Switch switchItem = (Switch)defaultLinearItem.Extra; + switchItem.IsSelected = !switchItem.IsSelected; break; } }