GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeMomentsPlayerCtaStyle - Android

The BlazeMomentsPlayerCtaStyle class represents the style configuration for the call-to-action (CTA) buttons in a moment.

Properties

cornerRadius

var cornerRadius: BlazeDp

The corner radius of the CTA.

borderColor

@ColorInt var borderColor: Int

The 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: BlazeDp

The 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: Float

The 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: BlazeDp

The height of the CTA.

icon

var icon: BlazeMomentsPlayerCtaIconStyle?

The icon inside the CTA.

layoutPositioning

var layoutPositioning: BlazeMomentsPlayerCtaStyle.BlazeCTAPositioning

The layout positioning of the CTA. See BlazeCTAPositioning below.

horizontalAlignment

var horizontalAlignment: BlazeMomentsPlayerCtaStyle.BlazeCTAHorizontalAlignment

The horizontal alignment of the CTA. See BlazeCTAHorizontalAlignment below.

isVisible

var isVisible: Boolean

Whether 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.

ValueDescription
CTA_BELLOW_BOTTOM_BUTTONS_BOXPosition the CTA button below the bottom buttons box, aligning it vertically beneath them.
CTA_NEXT_TO_BOTTOM_BUTTONS_BOXPosition 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.

ValueDescription
STARTAlign the CTA button to the start edge of its container.
CENTERCenter the CTA button horizontally within its container.
ENDAlign the CTA button to the end edge of its container.
FULL_AVAILABLE_WIDTHAdjust 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.

Did this page help you?