public interface SecureInputBuilderV2
Modifier and Type | Interface and Description |
---|---|
static class |
SecureInputBuilderV2.ButtonTouchVisual
The visual response for keypad button touch.
|
static class |
SecureInputBuilderV2.LabelAlignment
Secure input UI label alignment.
|
static class |
SecureInputBuilderV2.LogoPosition
Secure input UI logo position.
|
static class |
SecureInputBuilderV2.OkButtonBehavior
Secure input UI OK button behavior.
|
static class |
SecureInputBuilderV2.UiControlFocusState
Secure input UI control focus state.
|
static class |
SecureInputBuilderV2.UiControlState
Secure input UI control state.
|
Modifier and Type | Method and Description |
---|---|
SecureInputUi |
buildPinpad(boolean isScrambled,
boolean isDoubleInputField,
boolean isDialog,
SecurePinpadListenerV2 listener)
Create a new secure keypad.
|
void |
setButtonBackgroundColor(SecureInputBuilderV2.UiControlState state,
int color)
Set the background color for all the buttons.
|
void |
setButtonBackgroundImage(android.graphics.Bitmap image)
Set background image for all the buttons.
|
void |
setButtonBackgroundImage(int resourceId)
Set Button background image resource id for all the buttons.
|
void |
setButtonBackgroundImageOpacity(SecureInputBuilderV2.UiControlState state,
float opacity)
Set the background image opacity for normal and disabled state for all
the buttons.
|
void |
setButtonBorderColor(int color)
Deprecated.
Will be removed future major release.
The API is split into two APIs;
setKeypadFrameColor(int) and setKeypadGridGradientColors(int, int) |
void |
setButtonBorderWidth(int width)
Set the button border width for all the buttons (must be greater than 0 and
less than or equal to 8)
|
void |
setButtonGradientColor(SecureInputBuilderV2.UiControlState state,
int buttonGradientColorStart,
int buttonGradientColorEnd)
Set the start and end color of the button gradient for corresponding control state.
|
void |
setButtonHighlightColorOpacity(float opacity)
Set the highlight color opacity of all the buttons.
|
void |
setButtonPressVisibility(boolean isVisible)
Set whether the buttons should be highlighted when pressed.
|
void |
setButtonTouchVisualEffect(SecureInputBuilderV2.ButtonTouchVisual buttonTouchVisual)
Set the visual effect for keypad button touch like highlight or ripple.
|
void |
setDeleteButtonFont(android.graphics.Typeface font)
Set the font type for delete button text.
|
void |
setDeleteButtonFontSize(int size)
Set the font size for delete button text.
|
void |
setDeleteButtonGradientColor(SecureInputBuilderV2.UiControlState state,
int deleteButtonGradientColorStart,
int deleteButtonGradientColorEnd)
Set the start and end color of the delete button gradient for corresponding control state.
|
void |
setDeleteButtonImage(int resourceId)
Set the image on the delete button.
|
void |
setDeleteButtonImageOpacity(SecureInputBuilderV2.UiControlState state,
float opacity)
Set the Delete button image opacity value for normal and disabled state.
|
void |
setDeleteButtonText(java.lang.String text)
Set the text on the delete button.
|
void |
setDeleteButtonTextColor(SecureInputBuilderV2.UiControlState state,
int color)
Set the color of the delete button text to be displayed for corresponding control state.
|
void |
setDialogHeightToScreenRatio(float ratio)
Set the height to screen ratio of keypad in dialog mode.
|
void |
setDialogWidthToScreenRatio(float ratio)
Set the width to screen ratio of keypad in dialog mode.
|
void |
setDistanceBetweenKeyAndSubscript(int distance)
Set the distance between key and subscripts.
|
void |
setEncoding(java.lang.String encoding)
Set the encoding format, the encoding types available include UTF-8,
UTF-16, UTF-16LE, UTF-16BE, ISO-8859-1 and US-ASCII.
|
void |
setFirstLabel(java.lang.String label)
Set the text of the first label.
|
void |
setInputFieldBackgroundColor(SecureInputBuilderV2.UiControlFocusState state,
int color)
Set the background color of the input field for for corresponding focus states.
|
void |
setInputFieldBorderColor(SecureInputBuilderV2.UiControlFocusState focusState,
int color)
Set the color of the input field border for for corresponding focus states.
|
void |
setInputFieldFontSize(int size)
Set the font size of the input field.
|
void |
setIsDeleteButtonAlwaysEnabled(boolean alwaysEnabledDelete)
Set whether the Delete button should always be enabled even when there is nothing to delete.
|
void |
setIsDeleteButtonVisible(boolean visible)
Set the DELETE button visible or not.
|
void |
setIsOkButtonDisabled(boolean disabled)
Set the OK button disabled state when the OK button behavior is configured
as
SecureInputBuilderV2.OkButtonBehavior.CUSTOM or SecureInputBuilderV2.OkButtonBehavior.ALWAYS_ENABLED . |
void |
setKeyColor(SecureInputBuilderV2.UiControlState state,
int color)
Set the text color of the keys for normal and selected state.
|
void |
setKeyFont(android.graphics.Typeface font)
Set the custom font for buttons including key and the subscript of key.
|
void |
setKeyFontSize(int size)
Set the key font size.
|
void |
setKeypadFrameColor(int color)
Set the frame color of the keypad.
|
void |
setKeypadGridGradientColors(int gridGradientStartColor,
int gridGradientEndColor)
Set the grid gradient start and end color for keypad grids.
|
void |
setKeypadHeight(float height)
Set keypad height.
|
void |
setKeypadHeightRatio(float heightRatio)
Set the height ratio of the keypad against the entire secure keypad (keypad + top screen).
|
void |
setKeypadMatrix(int rows,
int columns)
Set the matrix (number of rows and columns) of keypad.
|
void |
setKeypadWidth(float width)
Set keypad width.
|
void |
setKeys(java.lang.String keys)
Set Character choices for the constitution of the PIN.
|
void |
setLabelAlignment(SecureInputBuilderV2.LabelAlignment alignment)
Set the label text position.
|
void |
setLabelColor(int color)
Set the text color of the label.
|
void |
setLabelFontSize(int size)
Set the label font size.
|
void |
setLogoBarBackgroundColor(int color)
Set the top logo bar background color.
|
void |
setLogoImage(android.graphics.Bitmap image)
Set the bitmap for the top logo.
|
void |
setLogoImage(int resourceId)
Set the resource id for the top logo image.
|
void |
setLogoPosition(SecureInputBuilderV2.LogoPosition logoPosition)
Set the logo position.
|
void |
setMaximumAndMinimumInputLength(int maximumLength,
int minimumLength)
Set the maximum and minimum input length for the input field.
|
void |
setOkButtonBehavior(SecureInputBuilderV2.OkButtonBehavior okButtonBehavior)
Set the OK button behavior.
|
void |
setOkButtonFont(android.graphics.Typeface font)
Set the font for OK button text.
|
void |
setOkButtonFontSize(int size)
Set the font size for OK button text.
|
void |
setOkButtonGradientColor(SecureInputBuilderV2.UiControlState state,
int okButtonGradientColorStart,
int okButtonGradientColorEnd)
Set the start and end color of the OK button gradient for corresponding control state.
|
void |
setOkButtonImage(int resourceId)
Set the image on the OK button.
|
void |
setOkButtonImageOpacity(SecureInputBuilderV2.UiControlState state,
float opacity)
Set the OK button image opacity value for normal and disabled state.
|
void |
setOkButtonText(java.lang.String text)
Set text for OK button.
|
void |
setOkButtonTextColor(SecureInputBuilderV2.UiControlState state,
int color)
Set the color of the OK button text to be displayed for corresponding control state.
|
void |
setRippleEffectParameters(int color,
long durationMs)
API to set the ripple effect parameters like duration and color.
|
void |
setScreenBackgroundColor(int color)
Set the screen background color of the keypad.
|
void |
setScreenBackgroundImage(android.graphics.Bitmap image)
Set the the screen background image of the keypad.
|
void |
setSecondLabel(java.lang.String label)
Set the text of the second label.
|
void |
setSubscriptColor(SecureInputBuilderV2.UiControlState state,
int color)
Set the color of subscripts for normal and selected state.
|
void |
setSubscriptFontSize(int size)
Set the font size of subscripts.
|
void |
setSubscripts(java.util.List<java.lang.String> subscripts)
Set the subscripts to be displayed aside of keys on the keypad.
|
void |
showTopScreen(boolean show)
Set whether to display the top screen of secure keypad.
|
void |
swapOkAndDeleteButton()
Set whether to swap the position of OK button and Delete button.
|
void |
validateKeypadConfiguration()
Validate all the keypad configuration.
|
void |
wipe()
Wipe away all the sensitive data of the Secure Input Builder.
|
SecureInputUi buildPinpad(boolean isScrambled, boolean isDoubleInputField, boolean isDialog, SecurePinpadListenerV2 listener)
Notice: This method should be called once all the necessary configurations have been done. Note that the default configuration will be applied for attributes that have not been set to custom values.
isScrambled
- This boolean value indicates whether the keypad would have a scrambled key locations.
The scrambling is completely random and different for each time the keypad is shown.isDoubleInputField
- If this Boolean value is true then secure keypad will show
two input box. And if it is false it will show only one input
box.isDialog
- If this Boolean value is true then secure keypad will shown
as Dialog (Popup). And if it is false it will shown as View
(FullScreen).listener
- Interface to create the communication channel between
library and the main application. This interface will be used
when user press keypad button. Secure pin will be provided as a
callback value once the user input is finished.SecureInputUi
that contains the secure
keypad DialogFragment
and method selectInputField
.java.lang.NullPointerException
- when the listener is nullvoid setEncoding(java.lang.String encoding)
encoding
- Default value is "UTF-8".void setScreenBackgroundColor(int color)
color
- Default value is
SecureInputDefaultSettings.SCREEN_BACKGROUND_COLOR
.void setScreenBackgroundImage(android.graphics.Bitmap image)
image
- the screen background image.java.lang.IllegalArgumentException
- when the image is null.void setLogoImage(android.graphics.Bitmap image)
image
- the logo image to be set.java.lang.IllegalArgumentException
- when the image is null.void setLogoImage(@DrawableRes int resourceId)
resourceId
- the resource id of the logo image to be set.void setLogoPosition(SecureInputBuilderV2.LogoPosition logoPosition)
logoPosition
- the logo position. Default value is
SecureInputDefaultSettings.LOGO_IMAGE_POSITION
void setLogoBarBackgroundColor(int color)
color
- Default value is
SecureInputDefaultSettings.LOGOBAR_BACKGROUND_COLOR
.void showTopScreen(boolean show)
show
- true to show the top screen and false to hide the top screen.
Default is true
.void setKeys(java.lang.String keys)
keys
- The keys to be set, cannot be null or empty. Don't allow duplicate characters.
And only digits and alphabets (both lower and upper case) are supported.
Default value is SecureInputDefaultSettings.DEFAULT_KEYS
.java.lang.IllegalArgumentException
- when this character array is null, empty, non-alphanumeric or contains duplicate
characters.void setKeyFont(android.graphics.Typeface font)
>Note: This function only applies to keys and the subscripts of keys. The control
buttons, i.e. OK button and delete button, are not affected by calling this method. Call the
methods setOkButtonFont(Typeface)
and setDeleteButtonFont(Typeface)
to configure the OK button and delete button font respectively.
font
- the typeface of the button text.java.lang.IllegalArgumentException
- when the font is null.void setKeyFontSize(int size)
size
- the font size of keys. Default value is
SecureInputDefaultSettings.BUTTON_FONT_SIZE
java.lang.IllegalArgumentException
- when the font size is NOT in the range of 1 to 100.void setKeyColor(SecureInputBuilderV2.UiControlState state, int color)
setOkButtonTextColor(UiControlState, int)
} and setDeleteButtonTextColor(UiControlState, int)
}
to configure the OK button and delete button text color respectively.state
- The button state, there is no SecureInputBuilderV2.UiControlState.DISABLED
for
the keys to be displayed on the button.color
- the color to be set. Default value
void setSubscripts(java.util.List<java.lang.String> subscripts)
subscripts
- The subscript strings to be configured, can be null or empty.
Default is not set.
Note: The keys must have been set in order to set the subscripts.
void setSubscriptFontSize(int size)
size
- The size of subscripts to be configured.Default value is
SecureInputDefaultSettings.SUBSCRIPT_FONT_SIZE
java.lang.IllegalArgumentException
- when the font size is NOT in the range of 1 to 100, or
the font size is bigger than key font size.void setSubscriptColor(SecureInputBuilderV2.UiControlState state, int color)
state
- The button state, there is no SecureInputBuilderV2.UiControlState.DISABLED
for
the subscript to be displayed on the button.color
- The color of subscripts to be configured. Default value
void setDistanceBetweenKeyAndSubscript(int distance)
distance
- the distance, should be in the range from 0 to 4. Default value is
SecureInputDefaultSettings.DISTANCE_BETWEEN_KEY_AND_SUBSCRIPT
java.lang.IllegalArgumentException
- when the distance is less than 0 or greater than 4.void setKeypadWidth(float width)
Notice:
This method must be called if developers want to call setLogoImage(Bitmap)
or
setLogoImage(int)
. Otherwise, this method is not compulsory.
width
- the keypad width, should be a value >= 0.java.lang.IllegalArgumentException
- when the width is less than 0.void setKeypadHeight(float height)
Notice:
This method must be called if developers wish to call setLogoImage(Bitmap)
or
setLogoImage(int)
. Otherwise, this method is not compulsory.
height
- the keypad width, should be a value >= 0.java.lang.IllegalArgumentException
- when the height is less than 0.void setKeypadMatrix(int rows, int columns)
rows
- Default value is
SecureInputDefaultSettings.NO_OF_ROWS
.columns
- Default value is
SecureInputDefaultSettings.NO_OF_COLUMNS
.java.lang.IllegalArgumentException
- when the number of rows is NOT in the range of 1 to 8, or
number of columns is not in the range of 2 to 8.void setKeypadHeightRatio(float heightRatio)
Notice: This attribute only takes effect when secure keypad top screen is enabled.
heightRatio
- the height ratio of the keypad, should be in the range of 0.25 to 0.5.
Default value is SecureInputDefaultSettings.KEYPAD_HEIGHT_RATIO
java.lang.IllegalArgumentException
- when the height ratio value is NOT in the range of 0.25 to 0.5@Deprecated void setButtonBorderColor(int color)
setKeypadFrameColor(int)
and setKeypadGridGradientColors(int, int)
color
- the color, default value is SecureInputDefaultSettings.BUTTON_BORDER_COLOR
void setKeypadFrameColor(int color)
color
- the color, default value is SecureInputDefaultSettings.BUTTON_BORDER_COLOR
void setKeypadGridGradientColors(int gridGradientStartColor, int gridGradientEndColor)
gridGradientStartColor
- the start color of grid gradient, default value is SecureInputDefaultSettings.BUTTON_BORDER_COLOR
gridGradientEndColor
- the end color of grid gradient, default value is SecureInputDefaultSettings.BUTTON_BORDER_COLOR
void setButtonBackgroundImage(android.graphics.Bitmap image)
image
- the button background image.java.lang.IllegalArgumentException
- when the image is null.void setDialogHeightToScreenRatio(float ratio)
isDialog
is true
when you build the secure keypad using
buildPinpad(boolean, boolean, boolean, SecurePinpadListenerV2)
).ratio
- ratio of the keypad height to full screen. Default value is
SecureInputDefaultSettings.DIALOG_HEIGHT_TO_SCREEN_RATIO
java.lang.IllegalArgumentException
- when ratio is less or equal to zero.void setDialogWidthToScreenRatio(float ratio)
isDialog
is true
when you build the pin pad using
buildPinpad(boolean, boolean, boolean, SecurePinpadListenerV2)
).ratio
- ratio of the keypad width to full screen. Default value is
SecureInputDefaultSettings.DIALOG_WIDTH_TO_SCREEN_RATIO
java.lang.IllegalArgumentException
- when ratio is less or equal to zero.void setFirstLabel(java.lang.String label)
label
- The text for the first label. Default value is
SecureInputDefaultSettings.FIRST_LABEL
.java.lang.IllegalArgumentException
- when the label is null.void setSecondLabel(java.lang.String label)
label
- The text for the second label. Default value is
SecureInputDefaultSettings.SECOND_LABEL
.java.lang.IllegalArgumentException
- when the label is null.void setLabelColor(int color)
color
- the color to be set. Default value is
SecureInputDefaultSettings.LABEL_COLOR
.void setLabelFontSize(int size)
size
- the label font size. Default:
SecureInputDefaultSettings.LABEL_FONT_SIZE
java.lang.IllegalArgumentException
- when the font size is NOT in the range of 1 to 100void setLabelAlignment(SecureInputBuilderV2.LabelAlignment alignment)
alignment
- the label alignment. Default is SecureInputDefaultSettings.LABEL_ALIGNMENT
void setButtonBackgroundImageOpacity(SecureInputBuilderV2.UiControlState state, float opacity)
state
- the state to be configured for. Not applicable for SecureInputBuilderV2.UiControlState.SELECTED
opacity
- the opacity, should be a value between 0 and 1.0. Default value is
SecureInputDefaultSettings.DEFAULT_OPACITY
java.lang.IllegalArgumentException
- when the opacity is NOT in the range of 0 to 1.0void setButtonHighlightColorOpacity(float opacity)
opacity
- the opacity, should be a value between 0 and 1.0. Default value is
SecureInputDefaultSettings.DEFAULT_OPACITY
java.lang.IllegalArgumentException
- when the opacity is NOT in the range of 0 to 1.0void setButtonBorderWidth(int width)
width
- button border width. Default :
SecureInputDefaultSettings.BUTTON_BORDER_WIDTH
.java.lang.IllegalArgumentException
- when the width is NOT in the range of 1 to 8.void setButtonBackgroundColor(SecureInputBuilderV2.UiControlState state, int color)
state
- the button state.color
- the color of the state. Default value
SecureInputBuilderV2.UiControlState.NORMAL
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_NORMAL
,
SecureInputBuilderV2.UiControlState.SELECTED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_SELECTED
SecureInputBuilderV2.UiControlState.DISABLED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_DISABLED
void setButtonPressVisibility(boolean isVisible)
isVisible
- Default value is
SecureInputDefaultSettings.BUTTON_PRESS_VISIBILITY
.void setMaximumAndMinimumInputLength(int maximumLength, int minimumLength)
SecureInputBuilderV2.OkButtonBehavior.NONE
and SecureInputBuilderV2.OkButtonBehavior.CUSTOM
require minimum and maximum
input length to be the same.maximumLength
- Default value is
SecureInputDefaultSettings.MAXIMUM_INPUT_LENGTH
.minimumLength
- Default value is
SecureInputDefaultSettings.MINIMUM_INPUT_LENGTH
.java.lang.IllegalArgumentException
- when the minimum length is NOT in the range of 0 to 16, or
maximum length is NOT in the range of 1 to 16, or
minimum length is bigger than maximum length.void setDeleteButtonText(java.lang.String text)
text
- the text of delete button, Can NOT be null.
Default value is SecureInputDefaultSettings.DELETE_BUTTON_NAME
java.lang.IllegalArgumentException
- when the text is null.void setDeleteButtonFont(android.graphics.Typeface font)
font
- the font of delete buttonjava.lang.IllegalArgumentException
- when the font is null.void setDeleteButtonFontSize(int size)
size
- the font size,
Default value is SecureInputDefaultSettings.BUTTON_FONT_SIZE
java.lang.IllegalArgumentException
- when the font size is NOT in the range of 1 to 100.void setDeleteButtonTextColor(SecureInputBuilderV2.UiControlState state, int color)
state
- the control state.color
- the color to be set. Default values
SecureInputBuilderV2.UiControlState.NORMAL
is
SecureInputDefaultSettings.DELETE_BUTTON_TEXT_COLOR_NORMAL
,
SecureInputBuilderV2.UiControlState.SELECTED
is
SecureInputDefaultSettings.DELETE_BUTTON_TEXT_COLOR_SELECTED
,
SecureInputBuilderV2.UiControlState.DISABLED
is
SecureInputDefaultSettings.DELETE_BUTTON_TEXT_COLOR_DISABLED
,
void setDeleteButtonImage(@DrawableRes int resourceId)
resourceId
- the resource id of delete button image.void setDeleteButtonImageOpacity(SecureInputBuilderV2.UiControlState state, float opacity)
state
- the state to be configured for. Not applicable for SecureInputBuilderV2.UiControlState.SELECTED
opacity
- the opacity, should be a value between 0 and 1.0.
Default value is SecureInputDefaultSettings.DEFAULT_OPACITY
java.lang.IllegalArgumentException
- when the opacity is NOT in the range of 0 to 1.0void setIsDeleteButtonAlwaysEnabled(boolean alwaysEnabledDelete)
alwaysEnabledDelete
- Default value is false.void setOkButtonBehavior(SecureInputBuilderV2.OkButtonBehavior okButtonBehavior)
okButtonBehavior
- the behavior to be set.
Default value is SecureInputDefaultSettings.DEFAULT_OK_BUTTON_BEHAVIOR
java.lang.IllegalArgumentException
- when okButtonBehavior is set to SecureInputBuilderV2.OkButtonBehavior.NONE
or SecureInputBuilderV2.OkButtonBehavior.CUSTOM
and the maximum input length does not equal to the minimum input length set
by setMaximumAndMinimumInputLength(int, int)
void setOkButtonText(java.lang.String text)
text
- the text to be displayed on OK button.
Default value is SecureInputDefaultSettings.OK_BUTTON_NAME
java.lang.IllegalArgumentException
- when the text is null.void setOkButtonFont(android.graphics.Typeface font)
font
- the OK button font.java.lang.IllegalArgumentException
- when the font is null.void setOkButtonFontSize(int size)
size
- the OK button font size.
Default value is SecureInputDefaultSettings.BUTTON_FONT_SIZE
java.lang.IllegalArgumentException
- when the font size NOT in the range of 1 to 100void setOkButtonTextColor(SecureInputBuilderV2.UiControlState state, int color)
state
- the control state.color
- the color to be set. Default values
SecureInputBuilderV2.UiControlState.NORMAL
is
SecureInputDefaultSettings.OK_BUTTON_TEXT_COLOR_NORMAL
,
SecureInputBuilderV2.UiControlState.SELECTED
is
SecureInputDefaultSettings.OK_BUTTON_TEXT_COLOR_SELECTED
,
SecureInputBuilderV2.UiControlState.DISABLED
is
SecureInputDefaultSettings.OK_BUTTON_TEXT_COLOR_DISABLED
,
void setOkButtonImage(@DrawableRes int resourceId)
resourceId
- the image resource id for OK button.void setOkButtonImageOpacity(SecureInputBuilderV2.UiControlState state, float opacity)
state
- the state to be configured for. Not applicable for SecureInputBuilderV2.UiControlState.SELECTED
opacity
- the opacity, should be a value between 0 and 1.0.
Default value is SecureInputDefaultSettings.DEFAULT_OPACITY
java.lang.IllegalArgumentException
- when the opacity is NOT in the range of 0 to 1.0void swapOkAndDeleteButton()
void setInputFieldFontSize(int size)
size
- the font size of input field to be set.
Default value is SecureInputDefaultSettings.INPUT_FIELD_FONT_SIZE
java.lang.IllegalArgumentException
- when the font size is NOT in the range of 1 to 100void setInputFieldBorderColor(SecureInputBuilderV2.UiControlFocusState focusState, int color)
focusState
- The state to be set.color
- the color of the focus state. Default value
void setInputFieldBackgroundColor(SecureInputBuilderV2.UiControlFocusState state, int color)
state
- the state of input field.color
- the color of the focus state. Default value
void wipe()
Notice: The wipe will only reset the character array and scramble option. other non-sensitive configuration such as color setting and text-label setting won't be reset in this function.
Once wipe being called, the secure keypad is required to be dismissed / closed and re-built before next time usage.
void setButtonGradientColor(SecureInputBuilderV2.UiControlState state, int buttonGradientColorStart, int buttonGradientColorEnd)
state
- the control state.buttonGradientColorStart
- the color to be set. Default values
SecureInputBuilderV2.UiControlState.NORMAL
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_NORMAL
,
SecureInputBuilderV2.UiControlState.SELECTED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_SELECTED
,
SecureInputBuilderV2.UiControlState.DISABLED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_DISABLED
,
buttonGradientColorEnd
- the color to be set. Default values
SecureInputBuilderV2.UiControlState.NORMAL
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_NORMAL
,
SecureInputBuilderV2.UiControlState.SELECTED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_SELECTED
,
SecureInputBuilderV2.UiControlState.DISABLED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_DISABLED
,
void setOkButtonGradientColor(SecureInputBuilderV2.UiControlState state, int okButtonGradientColorStart, int okButtonGradientColorEnd)
state
- the control state.okButtonGradientColorStart
- the color to be set. Default values
SecureInputBuilderV2.UiControlState.NORMAL
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_NORMAL
,
SecureInputBuilderV2.UiControlState.SELECTED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_SELECTED
,
SecureInputBuilderV2.UiControlState.DISABLED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_DISABLED
,
okButtonGradientColorEnd
- the color to be set. Default values
SecureInputBuilderV2.UiControlState.NORMAL
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_NORMAL
,
SecureInputBuilderV2.UiControlState.SELECTED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_SELECTED
,
SecureInputBuilderV2.UiControlState.DISABLED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_DISABLED
,
void setDeleteButtonGradientColor(SecureInputBuilderV2.UiControlState state, int deleteButtonGradientColorStart, int deleteButtonGradientColorEnd)
state
- the control state.deleteButtonGradientColorStart
- the color to be set. Default values
SecureInputBuilderV2.UiControlState.NORMAL
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_NORMAL
,
SecureInputBuilderV2.UiControlState.SELECTED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_SELECTED
,
SecureInputBuilderV2.UiControlState.DISABLED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_DISABLED
,
deleteButtonGradientColorEnd
- the color to be set. Default values
SecureInputBuilderV2.UiControlState.NORMAL
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_NORMAL
,
SecureInputBuilderV2.UiControlState.SELECTED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_SELECTED
,
SecureInputBuilderV2.UiControlState.DISABLED
is
SecureInputDefaultSettings.BUTTON_BACKGROUND_COLOR_DISABLED
,
void setButtonBackgroundImage(@DrawableRes int resourceId)
resourceId
- the resource id of the button background to be set.void setIsOkButtonDisabled(boolean disabled)
SecureInputBuilderV2.OkButtonBehavior.CUSTOM
or SecureInputBuilderV2.OkButtonBehavior.ALWAYS_ENABLED
.disabled
- This boolean value indicates whether the OK button should be disabled.void setIsDeleteButtonVisible(boolean visible)
visible
- This boolean value indicates whether the DELETE button should be visible.void setButtonTouchVisualEffect(SecureInputBuilderV2.ButtonTouchVisual buttonTouchVisual)
buttonTouchVisual
- The visual effect for keypad button touch.
Requires setButtonPressVisibility(boolean)
be called first, set button press to be visible.void setRippleEffectParameters(int color, long durationMs)
color
- The color for ripple effect parameter.durationMs
- The duration for ripple effect parameter, unit is in millisecond.
Requires setButtonTouchVisualEffect(com.gemalto.idp.mobile.ui.secureinput.SecureInputBuilderV2.ButtonTouchVisual)
be called first, set the visual effect be ripple.void validateKeypadConfiguration()