From: Inhong Han Date: Mon, 8 Jan 2024 06:48:21 +0000 (+0900) Subject: Replace Picker with RadioButton as per new UX X-Git-Tag: accepted/tizen/8.0/unified/20240111.160636~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5655a6888fa254258566172432fd8a6db1470d93;p=profile%2Fiot%2Fapps%2Fdotnet%2Fsetting-inputmethod.git Replace Picker with RadioButton as per new UX Change-Id: I7a6f9c2c7011d9bafde2907f68a7682bcfebe914 --- diff --git a/SettingInputmethod/SettingInputmethod.sln b/SettingInputmethod/SettingInputmethod.sln index a88e33b..dfd700a 100644 --- a/SettingInputmethod/SettingInputmethod.sln +++ b/SettingInputmethod/SettingInputmethod.sln @@ -1,10 +1,11 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31005.135 + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34031.279 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingInputmethod", "SettingInputmethod\SettingInputmethod.csproj", "{e3e4b807-eb5b-4ebb-9078-968c852640a7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SettingInputmethod", "SettingInputmethod\SettingInputmethod.csproj", "{E3E4B807-EB5B-4EBB-9078-968C852640A7}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{f95ba813-baec-4eaf-b930-b88a794ea91e}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F95BA813-BAEC-4EAF-B930-B88A794EA91E}" ProjectSection(SolutionItems) = preProject tizen_workspace.yaml = tizen_workspace.yaml EndProjectSection @@ -15,13 +16,15 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {e3e4b807-eb5b-4ebb-9078-968c852640a7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {e3e4b807-eb5b-4ebb-9078-968c852640a7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {e3e4b807-eb5b-4ebb-9078-968c852640a7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {e3e4b807-eb5b-4ebb-9078-968c852640a7}.Release|Any CPU.Build.0 = Release|Any CPU - + {E3E4B807-EB5B-4EBB-9078-968C852640A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E3E4B807-EB5B-4EBB-9078-968C852640A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E3E4B807-EB5B-4EBB-9078-968C852640A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E3E4B807-EB5B-4EBB-9078-968C852640A7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {08BFEED7-C78F-4EFA-ADA0-8F7341ADF7FF} + EndGlobalSection EndGlobal diff --git a/SettingInputmethod/SettingInputmethod/DefaultKeyboardMenu.cs b/SettingInputmethod/SettingInputmethod/DefaultKeyboardMenu.cs index 70d4457..c966db2 100644 --- a/SettingInputmethod/SettingInputmethod/DefaultKeyboardMenu.cs +++ b/SettingInputmethod/SettingInputmethod/DefaultKeyboardMenu.cs @@ -23,6 +23,7 @@ using Tizen.NUI.Components; using System.Runtime.InteropServices; using System.Collections.ObjectModel; using Tizen; +using SettingCore.Views; namespace SettingInputmethod { @@ -33,7 +34,6 @@ namespace SettingInputmethod private static List imeList; private static List labelList; private int currentIndex = -1; - private int pickerIndex = 0; protected override View OnCreate() { @@ -48,8 +48,6 @@ namespace SettingInputmethod Layout = new LinearLayout() { LinearOrientation = LinearLayout.Orientation.Vertical, - VerticalAlignment = VerticalAlignment.Center, - HorizontalAlignment = HorizontalAlignment.Center, }, }; @@ -70,45 +68,26 @@ namespace SettingInputmethod labelList.Add(ImeInfo.label); if (string.Compare(defaultIse, ImeInfo.appId, false) == 0) - pickerIndex = i + 1; + currentIndex = i; } } - var picker = new Picker() + RadioButtonGroup radioButtonGroup = new RadioButtonGroup(); + for (int i = 0; i < labelList.Count; i++) { - SizeWidth = (float)(NUIApplication.GetDefaultWindow().Size.Width * 0.7), - SizeHeight = (float)(NUIApplication.GetDefaultWindow().Size.Height * 0.54), - MinValue = 1, - MaxValue = imeList.Count, - CurrentValue = pickerIndex, - DisplayedValues = new ReadOnlyCollection(labelList), - }; - - picker.ValueChanged += (sender, e) => - { - Log.Debug(LogTag, "current index : " + e.Value.ToString()); - currentIndex = e.Value - 1; - }; + RadioButtonListItem item = new RadioButtonListItem(labelList[i]); + item.RadioButton.IsSelected = i.Equals(currentIndex); - var button = new Button() - { - Text = Resource.Resources.IDS_COM_SK_OK_ABB, - }; + radioButtonGroup.Add(item.RadioButton); + scrollableContent.Add(item); + } - button.Clicked += (sender, e) => + radioButtonGroup.SelectedChanged += (sender, e) => { - if (currentIndex > -1 && String.Compare(defaultIse, imeList[currentIndex].appId) != 0) - { - Log.Debug(LogTag, "new keyboard : " + labelList[currentIndex]); - IsfControlSetActiveIme(imeList[currentIndex].appId); - } - - NavigateBack(); + Log.Debug(LogTag, "new keyboard : " + labelList[radioButtonGroup.SelectedIndex]); + IsfControlSetActiveIme(imeList[radioButtonGroup.SelectedIndex].appId); }; - scrollableContent.Add(picker); - scrollableContent.Add(button); - return scrollableContent; } } diff --git a/SettingInputmethod/SettingInputmethod/SettingInputmethod.csproj b/SettingInputmethod/SettingInputmethod/SettingInputmethod.csproj index 423dc6c..4a26212 100644 --- a/SettingInputmethod/SettingInputmethod/SettingInputmethod.csproj +++ b/SettingInputmethod/SettingInputmethod/SettingInputmethod.csproj @@ -18,7 +18,7 @@ - + diff --git a/SettingInputmethod/SettingInputmethod/res/allowed/SettingInputmethod.dll b/SettingInputmethod/SettingInputmethod/res/allowed/SettingInputmethod.dll index ef00453..3b06015 100644 Binary files a/SettingInputmethod/SettingInputmethod/res/allowed/SettingInputmethod.dll and b/SettingInputmethod/SettingInputmethod/res/allowed/SettingInputmethod.dll differ diff --git a/SettingInputmethod/SettingInputmethod/tizen-manifest.xml b/SettingInputmethod/SettingInputmethod/tizen-manifest.xml index 1069e59..ba40574 100644 --- a/SettingInputmethod/SettingInputmethod/tizen-manifest.xml +++ b/SettingInputmethod/SettingInputmethod/tizen-manifest.xml @@ -1,6 +1,6 @@  diff --git a/packaging/org.tizen.cssetting-inputmethod-1.1.0.rpk b/packaging/org.tizen.cssetting-inputmethod-1.1.0.rpk deleted file mode 100644 index 137b66f..0000000 Binary files a/packaging/org.tizen.cssetting-inputmethod-1.1.0.rpk and /dev/null differ diff --git a/packaging/org.tizen.cssetting-inputmethod-1.1.1.rpk b/packaging/org.tizen.cssetting-inputmethod-1.1.1.rpk new file mode 100644 index 0000000..7393acd Binary files /dev/null and b/packaging/org.tizen.cssetting-inputmethod-1.1.1.rpk differ diff --git a/packaging/org.tizen.cssetting-inputmethod.spec b/packaging/org.tizen.cssetting-inputmethod.spec index 1e43ec8..e53f842 100644 --- a/packaging/org.tizen.cssetting-inputmethod.spec +++ b/packaging/org.tizen.cssetting-inputmethod.spec @@ -1,6 +1,6 @@ Name: org.tizen.cssetting-inputmethod Summary: org.tizen.cssetting-inputmethod -Version: 1.1.0 +Version: 1.1.1 Release: 1 Group: N/A License: Apache-2.0