Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ITextInputController

interface ITextInputController
Extends com.amazon.apmf.IStandard Interface to input method framework for interacting with editable text and keyboard.

Methods

setInputFilters()

void setInputFilters(IInputFilter*[] filters)
Sets a series of filters that will be called in succession whenever the text of this EditableView is changed.

Parameters

filters
IInputFilter*[] — Required Array of IInputFilter.

getInputFilters()

IInputFilter*[] getInputFilters()
Returns the array of input filters that are currently applied to the current EditableView.

Returns

IInputFilter*[] Array of IInputFilter..

setSecureTextStrategy()

void setSecureTextStrategy(SecureTextStrategy* strategy)
Sets the password hide strategy to transform raw text to hidden text.

Parameters

strategy
SecureTextStrategy* — Required The strategy used to hide text.

addTextChangedListener()

com.amazon.apmf.ISubscription* addTextChangedListener(ITextChangedListener* listener)
Adds a listener for the text changed.

Parameters

listener
ITextChangedListener* — Required Pointer to an instance of ITextChangedListener.

Returns

com.amazon.apmf.ISubscription* ISubscription object related to the listener.

addInputActionListener()

com.amazon.apmf.ISubscription* addInputActionListener(IInputActionListener* listener)
Adds a listener for the on input action changed.

Parameters

listener
IInputActionListener* — Required Pointer to an instance of IInputActionListener.

Returns

com.amazon.apmf.ISubscription* ISubscription object related to the listener.

setAttributedText()

void setAttributedText(com.amazon.kepler.uitoolkit.graphics.IAttributedText* attributedText)
Sets the attributed text of the ITextInputController.

Parameters

attributedText
com.amazon.kepler.uitoolkit.graphics.IAttributedText* — Required The IAttributedText object to set the text of ITextInputController.

getAttributedText()

com.amazon.kepler.uitoolkit.graphics.IAttributedText* getAttributedText()
Returns the current attributed text displayed on the ITextInputController.

Returns

com.amazon.kepler.uitoolkit.graphics.IAttributedText* IAttributedText object of the ITextInputController.

insert()

void insert(com.amazon.kepler.uitoolkit.graphics.IAttributedText* attributedText)
Inserts text into the current position.

Parameters

attributedText
com.amazon.kepler.uitoolkit.graphics.IAttributedText* — Required Pointer to IAttributedText object to set the text of ITextInputController.

remove()

void remove(bool nextCharacter)
Removes the selected characters if selected, otherwise removes one character next or previous depending on the input parameter.

Parameters

nextCharacter
bool — Required If false, then remove the previous character of the current position, otherwise remove the next character.

replace()

void replace(com.amazon.kepler.uitoolkit.graphics.IAttributedText* attributedText)
Replaces the selected characters if selected, otherwise replaces the entire text of ITextInputController with the new attributed text.

Parameters

attributedText
com.amazon.kepler.uitoolkit.graphics.IAttributedText* — Required The IAttributedText object to replace the old text of ITextInputController.

isSecure()

bool isSecure()
Returns true if the ITextInputController text is secure.

Returns

bool bool True if the text is secure, else False.

invalidate()

void invalidate()
Invalidates the current state of ITextInputController to trigger a repaint.

begin()

u32 begin()
Returns the starting position of the current selection.

Returns

u32 Begin of the current selection.

end()

u32 end()
Returns the ending position of the current selection.

Returns

u32 End of the current selection.

setPosition()

void setPosition(u32 position)
Sets the position and an empty selection.

Parameters

position
u32 — Required New position.

getPosition()

u32 getPosition()
Gets the position and an empty selection.

Returns

u32 Current position of the cursor.

setSelection()

void setSelection(u32 start, u32 end)
Sets the text selection bounds using the start and end input. The default selection is 0,0.

Parameters

start
u32 — Required Index to start the selection from.
end
u32 — Required Index to stop the selection at.
Last modified on October 29, 2026