Adjust emoticon size 68/281668/2 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix tizen_7.0 tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.060418 accepted/tizen/7.0/unified/hotfix/20221116.110055 accepted/tizen/unified/20220921.170521 tizen_7.0_m2_release
authorInHong Han <inhong1.han@samsung.com>
Tue, 20 Sep 2022 10:24:34 +0000 (19:24 +0900)
committerInHong Han <inhong1.han@samsung.com>
Tue, 20 Sep 2022 10:27:54 +0000 (19:27 +0900)
Change-Id: I50e491b4193ad7be3bcad1018c10e46320fa8662

ISEDefaultNUI/EmoticonPage.cs
packaging/org.tizen.ISEDefaultNUI-1.0.0.tpk

index 095ab62..d4d840d 100644 (file)
@@ -2,7 +2,7 @@
 using System.Collections.Generic;
 using System.Text;
 using Tizen;
-using Tizen.Applications;\r
+using Tizen.Applications;
 using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Components;
@@ -796,26 +796,25 @@ namespace ISEDefaultNUI
             Max
         };
 
-        private Navigator navigator = null;
         private EmoticonGroup currentGroup;
         private List<int> recentEmoticons;
-        private static int pointSize = 16;
-        private static int itemSize = 76;
+        private static int pointSize = 32;
+        private static int itemSize = 120;
         private static ushort margin = 4;
         private static int portraitRow = 4;
         private static int portraitCol = 7;
         private static int landscapeRow = 3;
         private static int landscapeCol = 13;
         private View rootView;
-        private ScrollableBase scroll;\r
+        private ScrollableBase scroll;
         private const string RECENT_EMOTICONS = "RecentEmoticons";
 
-        private void DisplayCurrentEmoticonGroup()\r
-        {\r
-            Size2D windowSize = NUIApplication.GetDefaultWindow().Size;\r
-\r
-            scroll?.Dispose();\r
-\r
+        private void DisplayCurrentEmoticonGroup()
+        {
+            Size2D windowSize = NUIApplication.GetDefaultWindow().Size;
+
+            scroll?.Dispose();
+
             scroll = new ScrollableBase()
             {
                 WidthSpecification = LayoutParamPolicies.MatchParent,
@@ -829,13 +828,13 @@ namespace ISEDefaultNUI
                     Columns = landscapeCol
                 },
             };
-            rootView.Add(scroll);\r
-\r
-            Log.Info("NUIIME", "current group : " + currentGroup);\r
+            rootView.Add(scroll);
+
+            Log.Info("NUIIME", "current group : " + currentGroup);
             if (currentGroup == EmoticonGroup.RecentlyUsed)
             {
                 foreach (int emoticonCode in recentEmoticons)
-                {\r
+                {
                     AddEmoticon(emoticonCode);
                 }
             }
@@ -845,36 +844,36 @@ namespace ISEDefaultNUI
                 {
                     AddEmoticon(EmoticonList[(int)currentGroup][i]);
                 }
-            }\r
-\r
-            void AddEmoticon(int emoticonCode)\r
-            {\r
-                TextLabel emoticon = new TextLabel();\r
-                emoticon.Text = Char.ConvertFromUtf32(emoticonCode);\r
-                emoticon.Margin = new Extents(margin, margin, margin, margin);\r
-                emoticon.HorizontalAlignment = HorizontalAlignment.Center;\r
-                emoticon.VerticalAlignment = VerticalAlignment.Center;\r
-                emoticon.PointSize = pointSize;\r
-                emoticon.Size2D = new Size2D(itemSize, itemSize);\r
-\r
-                emoticon.TouchEvent += (object sender, TouchEventArgs e) =>\r
-                {\r
-                    if (e.Touch.GetState(0) == PointStateType.Up)\r
-                    {\r
-                        Log.Info("NUIIME", "text: " + emoticon.Text);\r
-                        InputMethodEditor.CommitString(emoticon.Text);\r
-                        UpdateRecentEmoticon(emoticonCode);\r
-                    }\r
-\r
-                    return true;\r
-                };\r
-\r
-                scroll.Add(emoticon);\r
-            }\r
-        }\r
-\r
-        private View CreateEmoticonView()\r
-        {\r
+            }
+
+            void AddEmoticon(int emoticonCode)
+            {
+                TextLabel emoticon = new TextLabel();
+                emoticon.Text = Char.ConvertFromUtf32(emoticonCode);
+                emoticon.Margin = new Extents(margin, margin, margin, margin);
+                emoticon.HorizontalAlignment = HorizontalAlignment.Center;
+                emoticon.VerticalAlignment = VerticalAlignment.Center;
+                emoticon.PointSize = pointSize;
+                emoticon.Size2D = new Size2D(itemSize, itemSize);
+
+                emoticon.TouchEvent += (object sender, TouchEventArgs e) =>
+                {
+                    if (e.Touch.GetState(0) == PointStateType.Up)
+                    {
+                        Log.Info("NUIIME", "text: " + emoticon.Text);
+                        InputMethodEditor.CommitString(emoticon.Text);
+                        UpdateRecentEmoticon(emoticonCode);
+                    }
+
+                    return true;
+                };
+
+                scroll.Add(emoticon);
+            }
+        }
+
+        private View CreateEmoticonView()
+        {
             Size2D windowSize = NUIApplication.GetDefaultWindow().Size;
 
             if (recentEmoticons != null && recentEmoticons.Count > 0)
@@ -895,14 +894,14 @@ namespace ISEDefaultNUI
                 },
                 WidthSpecification = LayoutParamPolicies.MatchParent,
                 HeightSpecification = LayoutParamPolicies.MatchParent,
-                Padding = new Extents(80, 80, 0, 0)
+                Padding = new Extents(120, 120, 0, 0)
             };
 
             DisplayCurrentEmoticonGroup();
 
-            Add(rootView);\r
-\r
-            return rootView;\r
+            Add(rootView);
+
+            return rootView;
         }
 
         public EmoticonPage()
@@ -915,78 +914,78 @@ namespace ISEDefaultNUI
         }
 
         public View GetView()
-        {\r
-            return rootView;\r
+        {
+            return rootView;
         }
 
-        public void SetEmoticonGroup(string groupName)\r
-        {\r
-            Log.Info("NUIIME", "Group name : " + groupName);\r
-\r
-            for (int i = 0; i < EmoticonGroupName.Count; i++)\r
-            {\r
-                if (EmoticonGroupName[i] == groupName) {\r
-                    if (i >= 1)\r
-                        currentGroup = (EmoticonGroup)i - 1;\r
-                    else\r
-                        currentGroup = EmoticonGroup.RecentlyUsed;\r
-                }\r
-            }\r
-\r
-            DisplayCurrentEmoticonGroup();\r
-        }\r
-\r
-        private bool RemoveFromEmoticonList(int emoticonCode)\r
-        {\r
-            return recentEmoticons.Remove(emoticonCode);\r
-        }\r
-\r
-        private void UpdateRecentEmoticon(int emoticonCode)\r
-        {\r
-            // remove from recent emoticon list\r
-            RemoveFromEmoticonList(emoticonCode);\r
-\r
-            recentEmoticons.Insert(0, emoticonCode);\r
-\r
-            WriteRecentEmoticonList();\r
-        }\r
-\r
-        private void ReadRecentEmoticonList()\r
-        {\r
-            string recentEmoticonString;\r
-            if (Preference.Contains(RECENT_EMOTICONS))\r
-            {\r
-                recentEmoticonString = Preference.Get<string>(RECENT_EMOTICONS);\r
-                Log.Info("NUIIME", "Read recent Emoticon string(" + recentEmoticonString + ")");\r
-            }\r
-            else {\r
-                Log.Info("NUIIME", "Failed to read recent Emoticon string");\r
-                return;\r
-            }\r
-\r
-            recentEmoticons.Clear();\r
-\r
-            string[] emoticon_list = recentEmoticonString.Split(" ");\r
-            foreach (string emoticon in emoticon_list)\r
-            {\r
-                if (String.IsNullOrEmpty(emoticon))\r
-                    continue;\r
-\r
-                int emoticonCode = Int32.Parse(emoticon);\r
-                recentEmoticons.Add(emoticonCode);\r
-            }\r
-        }\r
-\r
-        private void WriteRecentEmoticonList()\r
-        {\r
-            string recentEmoticonString = "";\r
-\r
-            foreach (int emoticonCode in recentEmoticons)\r
-            {\r
-                recentEmoticonString += emoticonCode + " ";\r
-            }\r
-\r
-            Preference.Set(RECENT_EMOTICONS, recentEmoticonString);\r
-        }\r
+        public void SetEmoticonGroup(string groupName)
+        {
+            Log.Info("NUIIME", "Group name : " + groupName);
+
+            for (int i = 0; i < EmoticonGroupName.Count; i++)
+            {
+                if (EmoticonGroupName[i] == groupName) {
+                    if (i >= 1)
+                        currentGroup = (EmoticonGroup)i - 1;
+                    else
+                        currentGroup = EmoticonGroup.RecentlyUsed;
+                }
+            }
+
+            DisplayCurrentEmoticonGroup();
+        }
+
+        private bool RemoveFromEmoticonList(int emoticonCode)
+        {
+            return recentEmoticons.Remove(emoticonCode);
+        }
+
+        private void UpdateRecentEmoticon(int emoticonCode)
+        {
+            // remove from recent emoticon list
+            RemoveFromEmoticonList(emoticonCode);
+
+            recentEmoticons.Insert(0, emoticonCode);
+
+            WriteRecentEmoticonList();
+        }
+
+        private void ReadRecentEmoticonList()
+        {
+            string recentEmoticonString;
+            if (Preference.Contains(RECENT_EMOTICONS))
+            {
+                recentEmoticonString = Preference.Get<string>(RECENT_EMOTICONS);
+                Log.Info("NUIIME", "Read recent Emoticon string(" + recentEmoticonString + ")");
+            }
+            else {
+                Log.Info("NUIIME", "Failed to read recent Emoticon string");
+                return;
+            }
+
+            recentEmoticons.Clear();
+
+            string[] emoticon_list = recentEmoticonString.Split(" ");
+            foreach (string emoticon in emoticon_list)
+            {
+                if (String.IsNullOrEmpty(emoticon))
+                    continue;
+
+                int emoticonCode = Int32.Parse(emoticon);
+                recentEmoticons.Add(emoticonCode);
+            }
+        }
+
+        private void WriteRecentEmoticonList()
+        {
+            string recentEmoticonString = "";
+
+            foreach (int emoticonCode in recentEmoticons)
+            {
+                recentEmoticonString += emoticonCode + " ";
+            }
+
+            Preference.Set(RECENT_EMOTICONS, recentEmoticonString);
+        }
     }
 }
index f21bb74..9e4b44e 100644 (file)
Binary files a/packaging/org.tizen.ISEDefaultNUI-1.0.0.tpk and b/packaging/org.tizen.ISEDefaultNUI-1.0.0.tpk differ