KMManager.getKeyboardInfo()
Summary
The getKeyboardInfo()
method returns information dictionary of the specified keyboard.
Syntax
KMManager.getKeyboardInfo(Context context, int index)
Parameters
context
- The context.
index
- 0-based position of the keyboard in keyboards list.
Returns
Returns an information dictionary of the specified keyboard with keys and values defined as HashMap<String key, String value>
.
Description
Use this method to get details of the keyboard at given position in keyboards list. Details include keyboard ID, language ID, keyboard name, language name and fonts.
Examples
Example: Using getKeyboardInfo()
The following script illustrate the use of getKeyboardInfo()
:
HashMap<String, String> keyboardInfo = KMManager.getKeyboardInfo(this, 1);
if (keyboardInfo != null) {
String keyboardId = keyboardInfo.get(KMManager.KMKey_KeyboardID);
String languageId = keyboardInfo.get(KMManager.KMKey_LanguageID);
String keyboardName = keyboardInfo.get(KMManager.KMKey_KeyboardName);
String languageName = keyboardInfo.get(KMManager.KMKey_LanguageName);
String font = keyboardInfo.get(KMManager.KMKey_Font);
String oskFont = keyboardInfo.get(KMManager.KMKey_OskFont);
//
}