Interface IEditableView
interface IEditableView
Extends IView
Defines functionality of EditableView UI element to enter or modify text.
Methods
setLanguage()
Sets the language for keyboard. If an invalid string is used as language, then “en_US” is used. The default value is “en_US”.voidsetLanguage(stringlanguage)
Parameters
language
string — Required
string to set language of keyboard.
setSecure()
Sets whethervoidsetSecure(boolsecure)
IEditableView text is secure or not.
By default, text is not secure.
Parameters
secure
bool — Required
bool to make text of IEditableView secure.
setText()
Sets the text of thevoidsetText(stringtext)
IEditableView.
The default value is an empty string.
Parameters
text
string — Required
string to set the text of IEditableView.
getText()
string getText()
Returns the current text displayed on an IEditableView.
Returns
string
text of the IEditableView.
setTextStyle()
Sets the text style of thevoidsetTextStyle(com.amazon.kepler.uitoolkit.graphics.ITextStyle*style)
IEditableView.
Parameters
style
com.amazon.kepler.uitoolkit.graphics.ITextStyle* — Required
ITextStyle type to set Text style.
setPlaceholder()
Sets the placeholder text of thevoidsetPlaceholder(stringplaceholder)
IEditableView.
The default value is an empty string.
Parameters
placeholder
string — Required
string to set placeholder text of the IEditableView.
setPlaceHolderTextStyle()
Set placeholder text style of anvoidsetPlaceHolderTextStyle(com.amazon.kepler.uitoolkit.graphics.ITextStyle*style)
IEditableView.
Parameters
style
com.amazon.kepler.uitoolkit.graphics.ITextStyle* — Required
ITextStyle to set placeholder text style.
setParagraphTextStyle()
Set the paragraph style ofvoidsetParagraphTextStyle(com.amazon.kepler.uitoolkit.graphics.IParagraphStyle*style)
IEditableView.
Parameters
style
com.amazon.kepler.uitoolkit.graphics.IParagraphStyle* — Required
IParagraphStyle to set placeholder text style.
getParagraphTextStyle()
Gets the paragraph style ofcom.amazon.kepler.uitoolkit.graphics.IParagraphStyle*getParagraphTextStyle()
IEditableView.
Returns
com.amazon.kepler.uitoolkit.graphics.IParagraphStyle*
IParagraphStyle object for the paragraph style of IEditableView.
setSelectionColor()
Sets a color of the highlighted text. The default color is Black = {255, 0, 0, 0}.voidsetSelectionColor(com.amazon.kepler.uitoolkit.graphics.Color*color)
Parameters
color
com.amazon.kepler.uitoolkit.graphics.Color* — Required
The color to associate with the selected (highlighted) text.
setAlwaysShowCursor()
Sets a flag to explicitly show the cursor, even when the editable is not in focus. By default, the cursor will not be shown if the editable is not in focus. Note that the cursor will be shown when the editable is in focus regardless of this setting.voidsetAlwaysShowCursor(boolshow)
Parameters
show
bool — Required
If true, then show the cursor on the unfocused editable.
setCursorColor()
Sets thevoidsetCursorColor(com.amazon.kepler.uitoolkit.graphics.Color*color)
Color of the cursor. The default color of the cursor is the same as the text color.
Parameters
color
com.amazon.kepler.uitoolkit.graphics.Color* — Required
The Color to associate with the cursor.
setCursorWidth()
Sets the width of the cursor. The default cursor width is 2.0.voidsetCursorWidth(floatcursorWidth)
Parameters
cursorWidth
float — Required
Float value of cursor width.
getCursorWidth()
float getCursorWidth()
Gets the width of the cursor.
Returns
float
The current width of the cursor.
obfuscate()
Sets the character used to obscure text whenvoidobfuscate(stringobscuringCharacter)
IEditableView is set to secure.
This is used to hide sensitive user information like passwords.
The default value of this is set to ”.”.
Parameters
obscuringCharacter
string — Required
Character used to obscure.
getObfuscatingCharacter()
string getObfuscatingCharacter()
Gets the character used to obscure text.
Returns
string
String used to obscure text.
setInputFlags()
Sets the list of input flags on the keyboard.voidsetInputFlags(com.amazon.kepler.intl.input_method.InputFlag[]inputFlags)
Parameters
inputFlags
com.amazon.kepler.intl.input_method.InputFlag[] — Required
list of enum of type InputFlag.
setInputType()
Sets the input type of the keyboard. The default input type isvoidsetInputType(com.amazon.kepler.intl.input_method.InputType*inputType)
InputType::NORMAL.
Parameters
inputType
com.amazon.kepler.intl.input_method.InputType* — Required
Enum of type InputType.
setInputAction()
Set the text in the return button of the keyboard and decides the type of action taken on click of the return key. The default action isvoidsetInputAction(com.amazon.kepler.intl.input_method.InputAction*inputAction)
InputAction::NONE, where the keyboard shows the regular “Enter” text on the return key and performs no special action.
Parameters
inputAction
com.amazon.kepler.intl.input_method.InputAction* — Required
enum of type InputAction.
setInputUiMode()
Sets the user interface mode for the keyboard. The default mode isvoidsetInputUiMode(com.amazon.kepler.intl.input_method.InputUiMode*inputUiMode)
InputUiMode::FULL_SCREEN.
Parameters
inputUiMode
com.amazon.kepler.intl.input_method.InputUiMode* — Required
enum value of type InputUiMode
setInputUiRegion()
Sets the rectangular region only whenvoidsetInputUiRegion(com.amazon.kepler.uitoolkit.graphics.Rect*inputUiRegion)
InputUiMode::FLOATING. is “FLOATING”, ignored otherwise.
The default value is {0.0,0.0,0.0,0.0}.
Parameters
inputUiRegion
com.amazon.kepler.uitoolkit.graphics.Rect* — Required
float coordinates of type Rect
setSpellCheck()
Enable or disable spell check onvoidsetSpellCheck(boolspellCheck)
IEditableView.
By default, spell check is disabled.
Parameters
spellCheck
bool — Required
Bool to enable/disable spell check.
showKeyboardOnFocus()
Opens the on-screen keyboard on focus on thevoidshowKeyboardOnFocus(boolshow)
IEditableView.
Parameters
show
bool — Required
If true, then the on-screen keyboard is shown, otherwise no action.
closeKeyboard()
void closeKeyboard()
setAuxiliaryOptions()
Sets auxiliary options which are used to customize keyboard layouts like keyboardTitle, actionButton labels etc.voidsetAuxiliaryOptions(IAuxiliaryOptions*options)
Parameters
options
IAuxiliaryOptions* — Required
Pointer to IAuxiliaryOptions object.
setEnabled()
Enables or disables thevoidsetEnabled(boolenabled)
IEditableView.
By default, IEditableView is enabled.
Parameters
enabled
bool — Required
Bool to enable/disable editing

