summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ISEDefaultNUI/EmoticonPage.cs239
-rw-r--r--packaging/org.tizen.ISEDefaultNUI-1.0.0.tpkbin407828 -> 1188980 bytes
2 files changed, 119 insertions, 120 deletions
diff --git a/ISEDefaultNUI/EmoticonPage.cs b/ISEDefaultNUI/EmoticonPage.cs
index 095ab62..d4d840d 100644
--- a/ISEDefaultNUI/EmoticonPage.cs
+++ b/ISEDefaultNUI/EmoticonPage.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
using Tizen;
-using Tizen.Applications;
+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;
+ private ScrollableBase scroll;
private const string RECENT_EMOTICONS = "RecentEmoticons";
- private void DisplayCurrentEmoticonGroup()
- {
- Size2D windowSize = NUIApplication.GetDefaultWindow().Size;
-
- scroll?.Dispose();
-
+ 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);
-
- Log.Info("NUIIME", "current group : " + currentGroup);
+ rootView.Add(scroll);
+
+ Log.Info("NUIIME", "current group : " + currentGroup);
if (currentGroup == EmoticonGroup.RecentlyUsed)
{
foreach (int emoticonCode in recentEmoticons)
- {
+ {
AddEmoticon(emoticonCode);
}
}
@@ -845,36 +844,36 @@ namespace ISEDefaultNUI
{
AddEmoticon(EmoticonList[(int)currentGroup][i]);
}
- }
-
- 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()
- {
+ }
+
+ 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);
-
- return rootView;
+ Add(rootView);
+
+ return rootView;
}
public EmoticonPage()
@@ -915,78 +914,78 @@ namespace ISEDefaultNUI
}
public View GetView()
- {
- return rootView;
+ {
+ return rootView;
}
- 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);
- }
+ 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);
+ }
}
}
diff --git a/packaging/org.tizen.ISEDefaultNUI-1.0.0.tpk b/packaging/org.tizen.ISEDefaultNUI-1.0.0.tpk
index f21bb74..9e4b44e 100644
--- a/packaging/org.tizen.ISEDefaultNUI-1.0.0.tpk
+++ b/packaging/org.tizen.ISEDefaultNUI-1.0.0.tpk
Binary files differ