summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi-hoon Lee <dalton.lee@samsung.com>2017-08-01 05:47:25 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:40 (GMT)
commit1f48470ae96bf348b70abcbaacdd97f4307854f8 (patch)
tree59acc2882d7d4f9116a65c5ff4b14263610e0fb5
parent2f54796d9060c506af13eff6f052c514a2f491e1 (diff)
downloadxamarin-forms-1f48470ae96bf348b70abcbaacdd97f4307854f8.zip
xamarin-forms-1f48470ae96bf348b70abcbaacdd97f4307854f8.tar.gz
xamarin-forms-1f48470ae96bf348b70abcbaacdd97f4307854f8.tar.bz2
Add IMEApplication class for supporting IME type applications
Change-Id: I359b5590d6f2046575013d9720990a2e54df37a2
-rw-r--r--.nuspec/Xamarin.Forms.Platform.Tizen.nuspec1
-rw-r--r--Xamarin.Forms.Platform.Tizen/IMEApplication.cs38
-rw-r--r--Xamarin.Forms.Platform.Tizen/project.json5
3 files changed, 42 insertions, 2 deletions
diff --git a/.nuspec/Xamarin.Forms.Platform.Tizen.nuspec b/.nuspec/Xamarin.Forms.Platform.Tizen.nuspec
index 9e5a6ae..1d71f76 100644
--- a/.nuspec/Xamarin.Forms.Platform.Tizen.nuspec
+++ b/.nuspec/Xamarin.Forms.Platform.Tizen.nuspec
@@ -19,6 +19,7 @@
<dependency id="Tizen.Applications.UI" version="1.5.8" />
<dependency id="Tizen.System.Information" version="1.0.4" />
<dependency id="Tizen.WebView" version="1.0.1" />
+ <dependency id="Tizen.Uix.InputMethod" version="1.0.6" />
</dependencies>
</metadata>
<files>
diff --git a/Xamarin.Forms.Platform.Tizen/IMEApplication.cs b/Xamarin.Forms.Platform.Tizen/IMEApplication.cs
new file mode 100644
index 0000000..0718e9c
--- /dev/null
+++ b/Xamarin.Forms.Platform.Tizen/IMEApplication.cs
@@ -0,0 +1,38 @@
+using System;
+using ElmSharp;
+using Tizen.Uix.InputMethod;
+
+namespace Xamarin.Forms.Platform.Tizen
+{
+ public class IMEApplication : FormsApplication
+ {
+ public EditorWindow EditorWindow
+ {
+ get { return MainWindow as EditorWindow; }
+ }
+
+ protected IMEApplication()
+ {
+ }
+
+ protected override void OnPreCreate()
+ {
+ Application.ClearCurrent();
+
+ /*
+ * Since the IMEWindow class acquires window handle from InputMethod module and
+ * the handle is created internally when calling InputMethodEditor.Create() function,
+ * this needs to be called BEFORE creating new IMEWindow instance.
+ */
+ InputMethodEditor.Create();
+ MainWindow = InputMethodEditor.GetMainWindow();
+ MainWindow.IndicatorMode = IndicatorMode.Hide;
+ }
+
+ protected override void OnTerminate()
+ {
+ InputMethodEditor.Destroy();
+ base.OnTerminate();
+ }
+ }
+}
diff --git a/Xamarin.Forms.Platform.Tizen/project.json b/Xamarin.Forms.Platform.Tizen/project.json
index eff6cbc..2b86591 100644
--- a/Xamarin.Forms.Platform.Tizen/project.json
+++ b/Xamarin.Forms.Platform.Tizen/project.json
@@ -6,11 +6,12 @@
"Tizen.Applications.Common": "1.5.8",
"Tizen.Applications.UI": "1.5.8",
"Tizen.System.Information": "1.0.4",
- "Tizen.WebView": "1.0.1"
+ "Tizen.WebView": "1.0.1",
+ "Tizen.Uix.InputMethod": "1.0.6"
},
"frameworks": {
"netstandard1.6": {
"imports": "portable-net45+win8+wpa81+wp8"
}
}
-} \ No newline at end of file
+}