Replace Picker with RadioButton as per new UX 29/303929/2
authorInhong Han <inhong1.han@samsung.com>
Mon, 8 Jan 2024 06:48:21 +0000 (15:48 +0900)
committerInhong Han <inhong1.han@samsung.com>
Tue, 9 Jan 2024 07:46:03 +0000 (16:46 +0900)
Change-Id: I7a6f9c2c7011d9bafde2907f68a7682bcfebe914

SettingInputmethod/SettingInputmethod.sln
SettingInputmethod/SettingInputmethod/DefaultKeyboardMenu.cs
SettingInputmethod/SettingInputmethod/SettingInputmethod.csproj
SettingInputmethod/SettingInputmethod/res/allowed/SettingInputmethod.dll
SettingInputmethod/SettingInputmethod/tizen-manifest.xml
packaging/org.tizen.cssetting-inputmethod-1.1.0.rpk [deleted file]
packaging/org.tizen.cssetting-inputmethod-1.1.1.rpk [new file with mode: 0644]
packaging/org.tizen.cssetting-inputmethod.spec

index a88e33b8bf074edf9df8de7012ec29964cf28b4b..dfd700aedb6dab819deeac10113f7e29971d4c18 100644 (file)
@@ -1,10 +1,11 @@
-Microsoft Visual Studio Solution File, Format Version 12.00\r
-# Visual Studio Version 16\r
-VisualStudioVersion = 16.0.31005.135\r
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio Version 17\r
+VisualStudioVersion = 17.7.34031.279\r
 MinimumVisualStudioVersion = 10.0.40219.1\r
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingInputmethod", "SettingInputmethod\SettingInputmethod.csproj", "{e3e4b807-eb5b-4ebb-9078-968c852640a7}"\r
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SettingInputmethod", "SettingInputmethod\SettingInputmethod.csproj", "{E3E4B807-EB5B-4EBB-9078-968C852640A7}"\r
 EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{f95ba813-baec-4eaf-b930-b88a794ea91e}"\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F95BA813-BAEC-4EAF-B930-B88A794EA91E}"\r
        ProjectSection(SolutionItems) = preProject\r
                tizen_workspace.yaml = tizen_workspace.yaml\r
        EndProjectSection\r
@@ -15,13 +16,15 @@ Global
                Release|Any CPU = Release|Any CPU\r
        EndGlobalSection\r
        GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {e3e4b807-eb5b-4ebb-9078-968c852640a7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
-               {e3e4b807-eb5b-4ebb-9078-968c852640a7}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
-               {e3e4b807-eb5b-4ebb-9078-968c852640a7}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
-               {e3e4b807-eb5b-4ebb-9078-968c852640a7}.Release|Any CPU.Build.0 = Release|Any CPU\r
-\r
+               {E3E4B807-EB5B-4EBB-9078-968C852640A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {E3E4B807-EB5B-4EBB-9078-968C852640A7}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {E3E4B807-EB5B-4EBB-9078-968C852640A7}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {E3E4B807-EB5B-4EBB-9078-968C852640A7}.Release|Any CPU.Build.0 = Release|Any CPU\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
        EndGlobalSection\r
+       GlobalSection(ExtensibilityGlobals) = postSolution\r
+               SolutionGuid = {08BFEED7-C78F-4EFA-ADA0-8F7341ADF7FF}\r
+       EndGlobalSection\r
 EndGlobal\r
index 70d44571ad2f0276dac5581ae0788f2da2a6b613..c966db2de81013d598c7ad779620f7dc8abc5b93 100644 (file)
@@ -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<ImeInformationStruct> imeList;
         private static List<string> 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<string>(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;
         }
     }
index 423dc6cc611115768ab17676253bb71a5ef79267..4a2621293ef3779ddcc5a5d5a676c708dc22752a 100644 (file)
@@ -18,7 +18,7 @@
 \r
   <ItemGroup>\r
     <PackageReference Include="SettingCore" Version="1.0.345" />\r
-    <PackageReference Include="Tizen.NET" Version="11.0.0.18009" />\r
+    <PackageReference Include="Tizen.NET" Version="11.0.0.18033" />\r
   </ItemGroup>\r
 \r
   <ItemGroup>\r
index ef004535c19e38e5a93adaa4b1484d1465e52ed0..3b060153052a3fcbcaa478a9d47d175243ade686 100644 (file)
Binary files a/SettingInputmethod/SettingInputmethod/res/allowed/SettingInputmethod.dll and b/SettingInputmethod/SettingInputmethod/res/allowed/SettingInputmethod.dll differ
index 1069e59b45f62c6fd3172f69965e1ea0afa455f2..ba405744adc9eff1946989f2974d5a06dac3d48a 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns="http://tizen.org/ns/packages" api-version="8.0"
-  package="org.tizen.cssetting-inputmethod" version="1.1.0"
+  package="org.tizen.cssetting-inputmethod" version="1.1.1"
   res-type="org.tizen.appfw.gadget.setting-inputmethod" res-version="1.0.0">
   <allowed-package id="org.tizen.*">
     <required-privileges>
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 (file)
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 (file)
index 0000000..7393acd
Binary files /dev/null and b/packaging/org.tizen.cssetting-inputmethod-1.1.1.rpk differ
index 1e43ec84a2d7b64d81ab10bb9b862775d1f8c489..e53f8427e9b3a6faeee15a898ac4c2653e1e946d 100644 (file)
@@ -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