KMManager.addKeyboard()
Summary
The addKeyboard()
method adds a keyboard into the keyboards list.
Syntax
KMManager.addKeyboard(Context context, HashMap<String, String> keyboardInfo)
Parameters
context
- The context.
keyboardInfo
- A dictionary of keyboard information with keys and values defined as
HashMap<String key, String value>
.
Returns
Returns true
if the keyboard was added successfully, false
otherwise.
Description
Use this method to include a keyboard in the keyboards list so that it can be selected from the keyboards menu. If the keyboard with same keyboard ID and language ID exists, it updates the existing keyboard info.
Examples
Example: Using addKeyboard()
The following script illustrate the use of addKeyboard()
:
// Add a custom keyboard
HashMap<String, String> kbInfo = new HashMap<String, String>();
kbInfo.put(KMManager.KMKey_KeyboardID, "tamil99m");
kbInfo.put(KMManager.KMKey_LanguageID, "ta");
kbInfo.put(KMManager.KMKey_KeyboardName, "Tamil 99M");
kbInfo.put(KMManager.KMKey_LanguageName, "Tamil");
kbInfo.put(KMManager.KMKey_KeyboardVersion, "1.1");
kbInfo.put(KMManager.KMKey_Font, "aava1.ttf");
KMManager.addKeyboard(this, kbInfo);