Package io.scanbot.sdk.ui_v2.common
Class ButtonConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class ButtonConfiguration implements Parcelable
Button configuration.
-
-
Field Summary
Fields Modifier and Type Field Description private Boolean
visible
private String
text
private String
accessibilityDescription
private BackgroundStyle
background
private ForegroundStyle
foreground
-
Constructor Summary
Constructors Constructor Description ButtonConfiguration(Map<String, Object> source)
ButtonConfiguration(JSONObject json)
ButtonConfiguration(Boolean visible, String text, String accessibilityDescription, BackgroundStyle background, ForegroundStyle foreground)
-
Method Summary
Modifier and Type Method Description final Boolean
getVisible()
Whether the button is visible or not. final Unit
setVisible(Boolean visible)
Whether the button is visible or not. final String
getText()
The text to be displayed on the button. final Unit
setText(String text)
The text to be displayed on the button. final String
getAccessibilityDescription()
The text to be read when button is selected through accessibility mode. final Unit
setAccessibilityDescription(String accessibilityDescription)
The text to be read when button is selected through accessibility mode. final BackgroundStyle
getBackground()
The style of the button's background. final Unit
setBackground(BackgroundStyle background)
The style of the button's background. final ForegroundStyle
getForeground()
The style of the button's foreground (icon, text). final Unit
setForeground(ForegroundStyle foreground)
The style of the button's foreground (icon, text). final JSONObject
toJson()
final static ButtonConfiguration
default()
-
-
Constructor Detail
-
ButtonConfiguration
ButtonConfiguration(JSONObject json)
-
ButtonConfiguration
ButtonConfiguration(Boolean visible, String text, String accessibilityDescription, BackgroundStyle background, ForegroundStyle foreground)
-
-
Method Detail
-
getVisible
final Boolean getVisible()
Whether the button is visible or not. Default is true
-
setVisible
final Unit setVisible(Boolean visible)
Whether the button is visible or not. Default is true
-
getAccessibilityDescription
final String getAccessibilityDescription()
The text to be read when button is selected through accessibility mode. Default is ""
-
setAccessibilityDescription
final Unit setAccessibilityDescription(String accessibilityDescription)
The text to be read when button is selected through accessibility mode. Default is ""
-
getBackground
final BackgroundStyle getBackground()
The style of the button's background.
-
setBackground
final Unit setBackground(BackgroundStyle background)
The style of the button's background.
-
getForeground
final ForegroundStyle getForeground()
The style of the button's foreground (icon, text).
-
setForeground
final Unit setForeground(ForegroundStyle foreground)
The style of the button's foreground (icon, text).
-
toJson
final JSONObject toJson()
-
default
final static ButtonConfiguration default()
-
-
-
-