Libraries.Interface.Mobile.AndroidKeyboard Documentation

The AndroidKeyboard class creates and displays soft keyboards on Android devices. The soft keyboard is used in conjunction with the TextInputListener, TextInputEvent, KeyboardListener and KeyboardEvent classes to receive and process text on Android devices. By default, using the constructor DisplayKeyboard(), the keyboard has a "done" button and no options enabled, including auto-capitalizing sentences, auto-correcting misspellings, etc. You can also specify the type of keyboard to create and use by using the constructor DisplayKeyboard(integer keyboardType, integer returnButtonType) in combination with the constants of this class (DATE_AND_TIME, SEARCH, etc.) as the parameters. Note that keyboard options and settings are suggestions to the Android device, which may choose to ignore them and use the device settings instead.

Inherits from: Libraries.Language.Object

Variables Table

VariablesDescription
integer GOA returnButtonType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to change the appearance of the return/enter key on the keyboard. This makes the button display "go", a right-pointing arrow, or other similar appearances. Appearance varies based on the Android device and/or soft keyboard used.
integer DATE_AND_TIMEA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a numeric keyboard (0-9) that has punctuation useful for entering dates and times (:, /, etc.)
integer TEXT_AUTO_CAPITALIZE_LETTERS_NO_SUGGESTIONSA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a text keyboard which automatically capitalizes every letter, but does not offer suggestions or correct misspellings. Must be used in conjunction with the LINEFEED returnButtonType in order to create a keyboard that can input multiple lines. Note that keyboard options are suggestions to the Android device, which may ignore them and use the device settings instead.
integer SEARCHA returnButtonType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to change the appearance of the return/enter key on the keyboard. This makes the button display "search", a magnifying glass, or other similar appearances. Appearance varies based on the Android device and/or soft keyboard used.
integer TEXT_AUTO_CAPITALIZE_LETTERS_AUTO_CORRECTA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a text keyboard which automatically capitalizes every letter, automatically corrects misspellings, and offers suggestions. Must be used in conjunction with the LINEFEED returnButtonType in order to create a keyboard that can input multiple lines. Note that keyboard options are suggestions to the Android device, which may ignore them and use the device settings instead.
integer NUMERIC_NO_PUNCTUATIONA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a numeric keyboard (0-9) with all punctuation (., -, etc.) disabled.
integer TEXT_AUTO_CAPITALIZE_WORDS_AUTO_CORRECTA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a text keyboard which automatically capitalizes the first letter of each word, automatically corrects misspellings, and offers suggestions. Must be used in conjunction with the LINEFEED returnButtonType in order to create a keyboard that can input multiple lines. Note that keyboard options are suggestions to the Android device, which may ignore them and use the device settings instead.
integer DATEA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a numeric keyboard (0-9) that has punctuation useful for entering dates (/, -, etc.)
integer NUMERIC_SIGNED_DECIMALA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a numeric keyboard (0-9) which allows both a leading negative (-) to be entered as well as exactly one period (.). All other punctuation (*, /, etc.) is disabled.
integer PHONEA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a phone keyboard (0-9 with letters on the buttons) that has punctuation useful for entering phone numbers (-, #, etc.)
integer TEXT_AUTO_CAPITALIZE_SENTENCES_NO_SUGGESTIONSA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a text keyboard which automatically capitalizes the first letter of every sentence but does not offer suggestions or correct misspellings. Must be used in conjunction with the LINEFEED returnButtonType in order to create a keyboard that can input multiple lines. Note that keyboard options are suggestions to the Android device, which may ignore them and use the device settings instead.
integer LINEFEEDA returnButtonType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to change the appearance of the return/enter key on the keyboard. This makes the button display "enter", a carriage return, or other similar appearances. Appearance varies based on the Android device and/or soft keyboard used. Note that this returnButtonType must be used if you want multiple line input, and not all keyboard types, such as the numeric keyboards, will allow you to enter multiple line input even if this option is used (but it will still make the appearance that of a linefeed).
integer TEXT_AUTO_CAPITALIZE_SENTENCES_AUTO_CORRECTA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a text keyboard which automatically capitalizes the first letter of each sentence, automatically corrects misspellings, and offers suggestions. Must be used in conjunction with the LINEFEED returnButtonType in order to create a keyboard that can input multiple lines. Note that keyboard options are suggestions to the Android device, which may ignore them and use the device settings instead.
integer NEXTA returnButtonType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to change the appearance of the return/enter key on the keyboard. This makes the button display "next", a right-pointing arrow into a wall, or other similar appearances. Appearance varies based on the Android device and/or soft keyboard used.
integer SENDA returnButtonType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to change the appearance of the return/enter key on the keyboard. This makes the button display "send", a paper airplane, or other similar appearances. Appearance varies based on the Android device and/or soft keyboard used.
integer DONEA returnButtonType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to change the appearance of the return/enter key on the keyboard. This makes the button display "done", a checkmark or other similar appearances. Appearance varies based on the Android device and/or soft keyboard used.
integer NUMERIC_WITH_DECIMALA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a numeric keyboard (0-9) which allows exactly one period (.) to be entered. All other punctuation (-, /, etc.) is disabled.
integer NUMERIC_SIGNEDA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a numeric keyboard (0-9) which allows a leading negative (-) to be entered. All other punctuation (., /, etc.) is disabled.
integer EMAIL_ADDRESSA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a text keyboard with useful e-mail buttons immediately accessible, such as the at symbol (@) and a domain extension button (.com, .edu, etc.)
integer TEXT_NO_CORRECTIONSA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a text keyboard which does not offer suggestions, automatically capitalize any words, or fix any misspellings. Must be used in conjunction with the LINEFEED returnButtonType in order to create a keyboard that can input multiple lines. Note that keyboard options are suggestions to the Android device, which may ignore them and use the device settings instead.
integer TEXT_AUTO_CAPITALIZE_WORDS_NO_SUGGESTIONSA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a text keyboard which automatically capitalizes the first letter of every word but does not offer suggestions or correct misspellings. Must be used in conjunction with the LINEFEED returnButtonType in order to create a keyboard that can input multiple lines. Note that keyboard options are suggestions to the Android device, which may ignore them and use the device settings instead.
integer PREVIOUSA returnButtonType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to change the appearance of the return/enter key on the keyboard. This makes the button display "previous", a left-pointing arrow into a wall, or other similar appearances. Appearance varies based on the Android device and/or soft keyboard used.
integer TIMEA keyboardType used for DisplayKeyboard(integer keyboardType, integer returnButtonType) to create a numeric keyboard (0-9) that has punctuation useful for entering time (:)

Actions Documentation

CloseKeyboard()

This action closes the keyboard and removes it from the screen. This is called from within DisplayKeyboard() and DisplayKeyboard(integer keyboardType, integer returnButtonType) when the return button (except when the returnButtonType is LINEFEED) is pressed on the keyboard.

Example

AndroidKeyboard keyboard
keyboard:DisplayKeyboard(keyboard:PHONE, keyboard:DONE)
keyboard:CloseKeyboard()

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

DisplayKeyboard(integer keyboardType, integer returnButtonType)

This action creates and displays a customized keyboard. The type of keyboard is set by the keyboardType parameter, using one of the keyboardType constants from this class, and the enter key appearance/functionality is set by the returnButtonType parameter, using one of the returnButtonType constants from this class.

Parameters

  • integer keyboardType: The type of keyboard (such as numeric) to create.
  • integer returnButtonType: The enter key appearance/functionality of the keyboard.

Example

AndroidKeyboard keyboard
keyboard:DisplayKeyboard(keyboard:PHONE, keyboard:DONE)

DisplayKeyboard()

This action creates and displays a default keyboard. The default keyboard has the TEXT_NO_CORRECTIONS keyboardType and DONE returnButtonType.

Example

AndroidKeyboard keyboard
keyboard:DisplayKeyboard()

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetKeyboardType()

This action gets the keyboardType of the keyboard.

Return

integer:

Example

AndroidKeyboard keyboard
keyboard:DisplayKeyboard()
integer keyboardType = keyboard:GetKeyboardType()

GetReturnButtonType()

This action gets the returnButtonType of the keyboard.

Return

integer:

Example

AndroidKeyboard keyboard
keyboard:DisplayKeyboard()
integer returnType = keyboard:GetReturnButtonType()