ForageElement

The interface that defines methods for configuring and interacting with a ForageElement. A ForageElement is a secure, client-side entity that accepts and submits customer input for a transaction. Both ForagePANEditText and ForagePINEditText adhere to the ForageElement interface.

See also

Inheritors

Properties

Link copied to clipboard
abstract var typeface: Typeface?

The Typeface that is used to render text within the ForageElement.

Functions

Link copied to clipboard
abstract fun clearText()

Clears the text input field of the ForageElement.

Link copied to clipboard
abstract fun getElementState(): T

Gets the current ElementState state of the ForageElement.

Link copied to clipboard
abstract fun setBoxStrokeColor(boxStrokeColor: Int)

Sets the border color of the input field.

Link copied to clipboard
abstract fun setBoxStrokeWidth(boxStrokeWidth: Int)

Sets the border thickness of the input field.

Link copied to clipboard
abstract fun setBoxStrokeWidthFocused(boxStrokeWidth: Int)

Sets the border thickness of the input field when the field is in focus state.

Link copied to clipboard
abstract fun setForageConfig(forageConfig: ForageConfig)

⚠️ The setForageConfig method is only valid for online-only transactions. Use setPosForageConfig for in-store POS Terminal transactions.

Link copied to clipboard
abstract fun setHint(hint: String)

Sets the text to be displayed when the ForageElement input field is empty.

Link copied to clipboard
abstract fun setHintTextColor(hintTextColor: Int)

Sets the hint text color.

Link copied to clipboard
abstract fun setOnBlurEventListener(l: SimpleElementListener)

Sets an event listener to be fired when the ForageElement is blurred.

Link copied to clipboard
abstract fun setOnChangeEventListener(l: StatefulElementListener<T>)

Sets an event listener to be fired when the text inside the ForageElement input field changes.

Link copied to clipboard
abstract fun setOnFocusEventListener(l: SimpleElementListener)

Sets an event listener to be fired when the ForageElement is in focus.

Link copied to clipboard
abstract fun setPosForageConfig(posForageConfig: PosForageConfig)

⚠️ The setPosForageConfig method is only valid for in-store POS Terminal transactions.

Link copied to clipboard
abstract fun setTextColor(textColor: Int)

Sets the text color for the ForageElement.

Link copied to clipboard
abstract fun setTextSize(textSize: Float)

Sets the text size for the ForageElement.