BlazeMomentsPlayerCtaStyle - Android
The BlazeMomentsPlayerCtaStyle class represents the style configuration for the call-to-action (CTA) buttons in a moment.
Properties
cornerRadius
var cornerRadius: BlazeDpThe corner radius of the CTA.
borderColor
@ColorInt var borderColor: IntThe SDK fallback border color of the CTA button, used when the backend/CMS provides no valid borderColor. Backend/CMS value takes priority when present and parseable. Defaults to Color.TRANSPARENT.
borderWidth
var borderWidth: BlazeDpThe SDK fallback border width of the CTA button in dp, used when the backend/CMS provides no borderWidth. Backend/CMS value takes priority when present. Defaults to 0.blazeDp.
textSize
var textSize: FloatThe size of the CTA text.
fontResId
@FontRes var fontResId: Int?The resource id of the CTA text font.
width
var width: BlazeDp?The width of the CTA.
If null is given, width of the CTA will act as match_parent.
height
var height: BlazeDpThe height of the CTA.
icon
var icon: BlazeMomentsPlayerCtaIconStyle?The icon inside the CTA.
layoutPositioning
var layoutPositioning: BlazeMomentsPlayerCtaStyle.BlazeCTAPositioningThe layout positioning of the CTA. See BlazeCTAPositioning below.
horizontalAlignment
var horizontalAlignment: BlazeMomentsPlayerCtaStyle.BlazeCTAHorizontalAlignmentThe horizontal alignment of the CTA. See BlazeCTAHorizontalAlignment below.
isVisible
var isVisible: BooleanWhether the CTA should be visible.
When false, the CTA will be hidden even if it should be shown according to the content.
Only applies to non-ad playables.
BlazeCTAPositioning
The layout positioning options for the CTA button.
| Value | Description |
|---|---|
| CTA_BELLOW_BOTTOM_BUTTONS_BOX | Position the CTA button below the bottom buttons box, aligning it vertically beneath them. |
| CTA_NEXT_TO_BOTTOM_BUTTONS_BOX | Position the CTA button next to bottom buttons box, typically on the same horizontal line. |
BlazeCTAHorizontalAlignment
The horizontal alignment options for the CTA button within its container.
| Value | Description |
|---|---|
| START | Align the CTA button to the start edge of its container. |
| CENTER | Center the CTA button horizontally within its container. |
| END | Align the CTA button to the end edge of its container. |
| FULL_AVAILABLE_WIDTH | Adjust the CTA button to match the maximum width of its container. This will make the button stretch to occupy the full available width, respecting the container's padding or margin as defined by layout constraints. |
Updated 11 days ago
