RichButtonTemplate
RichButton
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
A data class representing a template for displaying rich buttons in push notifications. Part of the Salesforce Marketing Cloud Unified SDK Push Models Module (v1.0.2).
Package: com.salesforce.marketingcloud.pushmodels.rich.buttons
Inheritance: Implements Template
1data class RichButtonTemplate(
2 val items: List<RichButtonTemplate.RichButton>,
3 val style: Style? = null
4) : TemplateA carousel template is used to display a list of items in a carousel.
1constructor(
2 items: List<RichButtonTemplate.RichButton>,
3 style: Style? = null
4)Parameters:
items: List of RichButton objects to displaystyle: Optional styling configuration for the template| Property | Type | Description |
|---|---|---|
identifier | String? | Override from Template, defaults to null |
items | List<RichButtonTemplate.RichButton> | The list of rich buttons to display |
style | Style? | Optional styling configuration |
type | Template.Type | Override from Template indicating template type |
1data class RichButton(
2 val identifier: String,
3 val title: Text? = null,
4 val icon: String? = null,
5 val style: Style? = null,
6 val actions: List<Action>? = listOf(Action.OpenApp)
7) : Parcelable, PushViewProperties:
identifier: Unique identifier for the buttontitle: Optional text content for the buttonicon: Optional icon resource stringstyle: Optional button-specific stylingactions: List of actions to perform; defaults to opening the app1object CompanionA companion object for the RichButtonTemplate class.
1open override fun toString(): StringReturns a string representation of the RichButtonTemplate object.
Template - Parent interfaceStyle - Styling configuration classAction - Action type for button interactionsText - Text content classPushView - Interface for push notification views