Package io.scanbot.sdk.ui_v2.common
Class BarButtonConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class BarButtonConfiguration implements Parcelable
Configuration of the button located on a bar.
-
-
Field Summary
Fields Modifier and Type Field Description private Booleanvisibleprivate StyledTexttitleprivate StringaccessibilityDescriptionprivate BackgroundStylebackgroundprivate IconStyleicon
-
Constructor Summary
Constructors Constructor Description BarButtonConfiguration(Map<String, Object> source)BarButtonConfiguration(JSONObject json)BarButtonConfiguration(Boolean visible, StyledText title, String accessibilityDescription, BackgroundStyle background, IconStyle icon)
-
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 StyledTextgetTitle()The text to be displayed on the button. final UnitsetTitle(StyledText title)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 IconStylegetIcon()Configuration of the icon appearance. final UnitsetIcon(IconStyle icon)Configuration of the icon appearance. final JSONObjecttoJson(ToJsonConfiguration config)final BarButtonConfigurationclone()final static BarButtonConfigurationdefault()-
-
Constructor Detail
-
BarButtonConfiguration
BarButtonConfiguration(JSONObject json)
-
BarButtonConfiguration
BarButtonConfiguration(Boolean visible, StyledText title, String accessibilityDescription, BackgroundStyle background, IconStyle icon)
-
-
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
-
getTitle
final StyledText getTitle()
The text to be displayed on the button.
-
setTitle
final Unit setTitle(StyledText title)
The text to be displayed on the button.
-
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.
-
toJson
final JSONObject toJson(ToJsonConfiguration config)
-
clone
final BarButtonConfiguration clone()
-
default
final static BarButtonConfiguration default()
-
-
-
-