Package io.scanbot.sdk.ui_v2.common
Class ButtonConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class ButtonConfiguration implements Parcelable
Configuration of the button.
-
-
Field Summary
Fields Modifier and Type Field Description private Booleanvisibleprivate Stringtextprivate StringaccessibilityDescriptionprivate BackgroundStylebackgroundprivate ForegroundStyleforeground
-
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 BooleangetVisible()Determines whether the button is visible or not. final UnitsetVisible(Boolean visible)Determines whether the button is visible or not. final StringgetText()The text to be displayed on the button. final UnitsetText(String text)The text to be displayed on the button. final StringgetAccessibilityDescription()The text to be read when the button is selected through accessibility mode. final UnitsetAccessibilityDescription(String accessibilityDescription)The text to be read when the button is selected through accessibility mode. final BackgroundStylegetBackground()Configuration of the background appearance for the button. final UnitsetBackground(BackgroundStyle background)Configuration of the background appearance for the button. final ForegroundStylegetForeground()Configuration of the appearance for foreground elements (e.g. final UnitsetForeground(ForegroundStyle foreground)Configuration of the appearance for foreground elements (e.g. final JSONObjecttoJson(ToJsonConfiguration config)final ButtonConfigurationclone()final static ButtonConfigurationdefault()-
-
Constructor Detail
-
ButtonConfiguration
ButtonConfiguration(JSONObject json)
-
ButtonConfiguration
ButtonConfiguration(Boolean visible, String text, String accessibilityDescription, BackgroundStyle background, ForegroundStyle foreground)
-
-
Method Detail
-
getVisible
final Boolean getVisible()
Determines whether the button is visible or not.
Default is true
-
setVisible
final Unit setVisible(Boolean visible)
Determines whether the button is visible or not.
Default is true
-
getAccessibilityDescription
final String getAccessibilityDescription()
The text to be read when the button is selected through accessibility mode.
Default is ""
-
setAccessibilityDescription
final Unit setAccessibilityDescription(String accessibilityDescription)
The text to be read when the button is selected through accessibility mode.
Default is ""
-
getBackground
final BackgroundStyle getBackground()
Configuration of the background appearance for the button.
-
setBackground
final Unit setBackground(BackgroundStyle background)
Configuration of the background appearance for the button.
-
getForeground
final ForegroundStyle getForeground()
Configuration of the appearance for foreground elements (e.g. text and/or icons, etc) of the button.
-
setForeground
final Unit setForeground(ForegroundStyle foreground)
Configuration of the appearance for foreground elements (e.g. text and/or icons, etc) of the button.
-
toJson
final JSONObject toJson(ToJsonConfiguration config)
-
clone
final ButtonConfiguration clone()
-
default
final static ButtonConfiguration default()
-
-
-
-