Package io.scanbot.sdk.ui_v2.common
Class BarButtonConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class BarButtonConfiguration implements Parcelable
Button configuration.
-
-
Field Summary
Fields Modifier and Type Field Description private Boolean
visible
private StyledText
title
private String
accessibilityDescription
private BackgroundStyle
background
private IconStyle
icon
-
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 Boolean
getVisible()
Whether the button is visible or not. final Unit
setVisible(Boolean visible)
Whether the button is visible or not. final StyledText
getTitle()
The text to be displayed on the button. final Unit
setTitle(StyledText title)
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 IconStyle
getIcon()
The style of the button's icon (icon, text). final Unit
setIcon(IconStyle icon)
The style of the button's icon (icon, text). final JSONObject
toJson()
final static BarButtonConfiguration
default()
-
-
Constructor Detail
-
BarButtonConfiguration
BarButtonConfiguration(JSONObject json)
-
BarButtonConfiguration
BarButtonConfiguration(Boolean visible, StyledText title, String accessibilityDescription, BackgroundStyle background, IconStyle icon)
-
-
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
-
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 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.
-
toJson
final JSONObject toJson()
-
default
final static BarButtonConfiguration default()
-
-
-
-