From: sungwook79.park Date: Wed, 20 Sep 2017 07:41:50 +0000 (+0900) Subject: Add Tizen .NET API Guide for Tizen.Uix.InputMethodManager X-Git-Tag: GitHub/PR#40/tizen-studio~10^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17de2e0e00c7c38ac7dc8a6166f941263b9746ac;p=sdk%2Fonline-doc.git Add Tizen .NET API Guide for Tizen.Uix.InputMethodManager PS3: Reviewed Change-Id: I8d4908f5ddec60970c005a6d503b5d7fe2cffbe7 Signed-off-by: sungwook79.park --- diff --git a/org.tizen.guides/html/dotnet/uix/inputmethod_manager_n.htm b/org.tizen.guides/html/dotnet/uix/inputmethod_manager_n.htm new file mode 100644 index 0000000..e8d904e --- /dev/null +++ b/org.tizen.guides/html/dotnet/uix/inputmethod_manager_n.htm @@ -0,0 +1,196 @@ + + + + + + + + + + + + + Input Method Manager + + + +
+ +
+

Dependencies

+
    +
  • Tizen 4.0 and Higher
  • +
+

Content

+ +

Related Info

+ +
+
+ +
+ +

Input Method Manager

+

You can manage the input method editors (IMEs) installed on the device. After your IME application is installed, you can use the input method manager to open a list of installed IMEs, allow the user to enable an installed IME, and show an IME selector, in which the user can see the enabled IMEs and select one as a default keyboard.

+

The main features of the Tizen.Uix.InputMethodManager namespace include:

+ +
    +
  • Showing the IME list +

    You can open the installed IME list menu. If a new IME has been installed, the user can see its name in the IME list, and can use the toggle button to enable the keyboard they want. All keyboards enabled in the IME list are shown in the IME selector to allow the user to select them as the default keyboard.

    +

    Figure: IME list

    +

    IME list

    +
  • +
  • Showing the IME selector +

    You can open the IME selector menu. When the user opens the IME selector menu, it shows all the keyboards enabled in the IME list. The user can change the default keyboard by selecting a new one. By clicking Select keyboard, the user can return to the IME list menu to enable a new IME.

    +

    Figure: IME selector

    +

    IME selector

    +
  • +
  • Checking the IME status +

    You can check whether a specific IME is enabled or disabled in the system keyboard setting. You can also check which IME is currently selected as the default keyboard, or how many IMEs are enabled (usable). These features are useful when the user installs a new keyboard.

  • +
+ +

Prerequisites

+ +

To enable your application to use the input method manager functionality:

+
    +
  1. To use the Tizen.Uix.InputMethodManager namespace, the application has to request permission by adding the following privilege to the tizen-manifest.xml file: +
    +<privileges>
    +   <privilege>http://tizen.org/privilege/imemanager</privilege>
    +</privileges>
    +
    +
  2. +
  3. To use the methods and properties of the Tizen.Uix.InputMethodManager namespace, include it in your application: +
    +using Tizen.Uix.InputMethodManager;
    +
    +
  4. +
+ +

Showing the IME List

+ +

To launch the IME list menu to show the installed IMEs, use the ShowIMEList() method of the Tizen.Uix.InputMethodManager.Manager class:

+ +
+void show_ime_list()
+{
+    try
+    {
+        Manager.ShowIMEList();
+    }
+    catch (Exception e)
+    {
+        /// Error handling
+    }
+}
+
+ + +

Showing the IME Selector

+ +

To launch the IME selector menu to allow the user to select the default keyboard, use the ShowIMESelector() method of the Tizen.Uix.InputMethodManager.Manager class:

+ +
+void show_ime_selector()
+{
+    try
+    {
+        Manager.ShowIMESelector();
+    }
+    catch (Exception e)
+    {
+        /// Error handling
+    }
+}
+
+ + +

Checking the IME State

+ +

To check whether a specific IME is enabled, to check the current default keyboard, or to get the number of enabled (usable) IMEs:

+ +
    +
  • To check whether a specific IME is enabled, use the IsIMEEnabled() method of the Tizen.Uix.InputMethodManager.Manager class. As a parameter, use the application ID of the IME whose status you want to check. + +
    +bool is_ime_enabled(string appId)
    +{
    +    try
    +    {
    +        bool result = Manager.IsIMEEnabled(app_id);
    +    }
    +    catch (Exception e)
    +    {
    +        /// Error handling
    +    }
    +
    +    return result;
    +}
    +
    +

    If the IME is enabled, the method returns true.

    +
  • + +
  • To check which IME is currently selected as the default keyboard, use the GetActiveIME() method, which returns the application ID of the currently selected IME as a string: + +
    +string get_active_ime()
    +{
    +    string app_id = null;
    +    try
    +    {
    +        app_id = Manager.GetActiveIME();
    +    }
    +    catch (Exception e)
    +    {
    +        /// Error handling
    +    }
    +
    +    return app_id;
    +}
    +
    +
  • + +
  • To get the number of enabled (usable) IMEs, use the GetEnabledIMECount() method: + +
    +int get_enabled_ime_count()
    +{
    +    int count = Manager.GetEnabledIMECount();
    +
    +    return count;
    +}
    +
    +
  • +
+ + + + +
+ +Go to top + + + + + + +