ContentCardStyling

open class ContentCardStyling(val modifier: <Error class: unknown class>? = null, val pinnedResourceId: Int = R.drawable.com_braze_content_card_icon_pinned, val pinnedImageAlignment: <Error class: unknown class> = Alignment.TopEnd, val unreadIndicatorColor: <Error class: unknown class> = Color.Unspecified, val pinnedComposable: () -> Unit? = null, val imageComposable: (Card) -> Unit? = null, val borderColor: <Error class: unknown class> = Color.Unspecified, val borderSize: <Error class: unknown class> = Dp.Unspecified, val topBorderSize: <Error class: unknown class> = Dp.Unspecified, val startBorderSize: <Error class: unknown class> = Dp.Unspecified, val endBorderSize: <Error class: unknown class> = Dp.Unspecified, val bottomBorderSize: <Error class: unknown class> = Dp.Unspecified, val borderRadius: <Error class: unknown class> = Dp.Unspecified, val shadowColor: <Error class: unknown class> = Color.Unspecified, val shadowSize: <Error class: unknown class> = Dp.Unspecified, val shadowRadius: <Error class: unknown class> = Dp.Unspecified, val maxCardWidth: <Error class: unknown class> = Dp.Unspecified, val listPadding: <Error class: unknown class> = 32.dp, val cardBackgroundColor: <Error class: unknown class> = Color.Unspecified, val titleTextStyle: <Error class: unknown class>? = null, val descriptionTextStyle: <Error class: unknown class>? = null, val actionHintTextStyle: <Error class: unknown class>? = null, val titleTextColor: <Error class: unknown class> = Color.Unspecified, val descriptionTextColor: <Error class: unknown class> = Color.Unspecified, val actionHintTextColor: <Error class: unknown class> = Color.Unspecified, val imageOnlyContentCardStyle: BrazeImageOnlyContentCardStyling = BrazeImageOnlyContentCardStyling(), val textAnnouncementContentCardStyle: BrazeTextAnnouncementContentCardStyling = BrazeTextAnnouncementContentCardStyling(), val shortNewsContentCardStyle: BrazeShortNewsContentCardStyling = BrazeShortNewsContentCardStyling(), val captionedImageContentCardStyle: BrazeCaptionedImageContentCardStyling = BrazeCaptionedImageContentCardStyling())

This specifies the various styles to use for rendering Content Cards.

Values will be pulled from the specific card type (imageOnlyContentCardStyle, textAnnouncementContentCardStyle, shortNewsContentCardStyle, and captionedImageContentCardStyle). If the value isn't present there, then it will used the more general value for all card types.

If the modifier is specified, it will be used directly with very little modification.

Note: Due to how Jetpack Compose works, listPadding is passed in here so that additional padding can be added to the cards. This is needed to allowed swiped cards to be swiped completely out of view. You will also need to add this to your modifier's padding if you specify your own.

Constructors

Link copied to clipboard
constructor(modifier: <Error class: unknown class>? = null, pinnedResourceId: Int = R.drawable.com_braze_content_card_icon_pinned, pinnedImageAlignment: <Error class: unknown class> = Alignment.TopEnd, unreadIndicatorColor: <Error class: unknown class> = Color.Unspecified, pinnedComposable: () -> Unit? = null, imageComposable: (Card) -> Unit? = null, borderColor: <Error class: unknown class> = Color.Unspecified, borderSize: <Error class: unknown class> = Dp.Unspecified, topBorderSize: <Error class: unknown class> = Dp.Unspecified, startBorderSize: <Error class: unknown class> = Dp.Unspecified, endBorderSize: <Error class: unknown class> = Dp.Unspecified, bottomBorderSize: <Error class: unknown class> = Dp.Unspecified, borderRadius: <Error class: unknown class> = Dp.Unspecified, shadowColor: <Error class: unknown class> = Color.Unspecified, shadowSize: <Error class: unknown class> = Dp.Unspecified, shadowRadius: <Error class: unknown class> = Dp.Unspecified, maxCardWidth: <Error class: unknown class> = Dp.Unspecified, listPadding: <Error class: unknown class> = 32.dp, cardBackgroundColor: <Error class: unknown class> = Color.Unspecified, titleTextStyle: <Error class: unknown class>? = null, descriptionTextStyle: <Error class: unknown class>? = null, actionHintTextStyle: <Error class: unknown class>? = null, titleTextColor: <Error class: unknown class> = Color.Unspecified, descriptionTextColor: <Error class: unknown class> = Color.Unspecified, actionHintTextColor: <Error class: unknown class> = Color.Unspecified, imageOnlyContentCardStyle: BrazeImageOnlyContentCardStyling = BrazeImageOnlyContentCardStyling(), textAnnouncementContentCardStyle: BrazeTextAnnouncementContentCardStyling = BrazeTextAnnouncementContentCardStyling(), shortNewsContentCardStyle: BrazeShortNewsContentCardStyling = BrazeShortNewsContentCardStyling(), captionedImageContentCardStyle: BrazeCaptionedImageContentCardStyling = BrazeCaptionedImageContentCardStyling())

Properties

Link copied to clipboard
val actionHintTextColor: <Error class: unknown class>

Color of the card description text. If not specified, it will fallback to R.color.com_braze_content_cards_action_hint_text_color

Link copied to clipboard
val actionHintTextStyle: <Error class: unknown class>? = null

TextStyle used for the title. If this is specified, other title text customization will be ignored.

Link copied to clipboard
val borderColor: <Error class: unknown class>

Border color. If not specified, it will fallback to R.color.com_braze_content_card_background_border

Link copied to clipboard
val borderRadius: <Error class: unknown class>

Size of the border radius. If not specified, it will fallback to R.dimen.com_braze_content_card_background_corner_radius

Link copied to clipboard
val borderSize: <Error class: unknown class>

Size of the border. This is used to handle all sides at once. If a specific size is specified (e.g. topBorderSize), that will be used instead.

Link copied to clipboard
val bottomBorderSize: <Error class: unknown class>

Size of the top border. If not specified, it will fallback to borderSize, and then R.dimen.com_braze_content_card_background_border_bottom

Link copied to clipboard

Style to use specifically for Captioned Image Content Cards. See note above.

Link copied to clipboard
val cardBackgroundColor: <Error class: unknown class>

Color of the card background. If not specified, it will fallback to R.color.com_braze_content_card_background

Link copied to clipboard
val descriptionTextColor: <Error class: unknown class>

Color of the card description text. If not specified, it will fallback to R.color.com_braze_content_cards_description

Link copied to clipboard
val descriptionTextStyle: <Error class: unknown class>? = null

TextStyle used for the title. If this is specified, other title text customization will be ignored.

Link copied to clipboard
val endBorderSize: <Error class: unknown class>

Size of the border on the end side. If not specified, it will fallback to borderSize, and then R.dimen.com_braze_content_card_background_border_right

Link copied to clipboard
val imageComposable: (Card) -> Unit? = null

A Composable function that accepts a Card and will render the image. If not specified, default image library is used (Coil)

Link copied to clipboard

Style to use specifically for Image Only Content Cards. See note above.

Link copied to clipboard
val listPadding: <Error class: unknown class>

Size of the list padding. See note above.

Link copied to clipboard
val maxCardWidth: <Error class: unknown class>

Maximum width of the card. If not specified, it will fallback to R.dimen.com_braze_content_cards_max_width

Link copied to clipboard
val modifier: <Error class: unknown class>? = null

to use for the card. If specified, it will be used directly, bypassing many of the other values here.

Link copied to clipboard
val pinnedComposable: () -> Unit? = null

A Composable function that will render on pinned cards. If this is specified, then the other pinned paramaters are not used.

Link copied to clipboard
val pinnedImageAlignment: <Error class: unknown class>

The alignment of the pinned image.

Link copied to clipboard

The drawable resource ID of the image used for pinned cards.

Link copied to clipboard
val shadowColor: <Error class: unknown class>

Color of the card shadow. If not specified, it will fallback to R.color.com_braze_content_card_background_shadow

Link copied to clipboard
val shadowRadius: <Error class: unknown class>

Size of the card shadow radius. If not specified, it will fallback to R.dimen.com_braze_content_card_background_shadow_radius

Link copied to clipboard
val shadowSize: <Error class: unknown class>

Size of the card shadow. If not specified, it will fallback to R.dimen.com_braze_content_card_background_shadow_bottom

Link copied to clipboard

Style to use specifically for Short News Content Cards. See note above.

Link copied to clipboard
val startBorderSize: <Error class: unknown class>

Size of the border on the start side. If not specified, it will fallback to borderSize, and then R.dimen.com_braze_content_card_background_border_left

Link copied to clipboard

Style to use specifically for Text Announcement Content Cards. See note above.

Link copied to clipboard
val titleTextColor: <Error class: unknown class>

Color of the card title text. If not specified, it will fallback to R.color.com_braze_content_cards_title

Link copied to clipboard
val titleTextStyle: <Error class: unknown class>? = null

TextStyle used for the title. If this is specified, other title text customization will be ignored.

Link copied to clipboard
val topBorderSize: <Error class: unknown class>

Size of the top border. If not specified, it will fallback to borderSize, and then R.dimen.com_braze_content_card_background_border_top

Link copied to clipboard
val unreadIndicatorColor: <Error class: unknown class>

The color of the unread indicator.

Functions

Link copied to clipboard
fun actionHintTextColor(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun borderColor(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun borderRadius(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun borderSize(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun bottomBorderSize(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun cardBackgroundColor(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun cardModifier(type: CardType, extraPadding: <Error class: unknown class>): <Error class: unknown class>

Return a modifier to be used for a specific card type. If a modifier has been specified for the specific card type, it will be used. If no modifier has been specified for the specific card type, then the general modifier will be used.

Link copied to clipboard
fun descriptionTextColor(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun descriptionTextStyle(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun endBorderSize(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun hintActionTextStyle(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun imageComposable(type: CardType): (Card) -> Unit?
Link copied to clipboard
fun maxCardWidth(): <Error class: unknown class>
Link copied to clipboard
fun pinnedAlignment(card: Card): <Error class: unknown class>
Link copied to clipboard
fun pinnedComposable(type: CardType): () -> Unit?
Link copied to clipboard
Link copied to clipboard
fun shadowColor(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun shadowRadius(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun shadowSize(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun startBorderSize(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun titleTextColor(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun titleTextStyle(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun topBorderSize(type: CardType): <Error class: unknown class>
Link copied to clipboard
fun unreadIndicatorColor(type: CardType): <Error class: unknown class>