Style

Package: com.salesforce.marketingcloud.pushmodels.data
Module: Push Models Module v1.0.2
Platform: androidJvm

Overview 

1interface Style : Parcelable

An interface for defining text styling in push notifications. Implements Android’s Parcelable for data transfer.

Inheritors 

Nested Types 

Alignment 

1enum class Alignment : Enum<Style.Alignment>

Enumeration for text alignment options.

Companion 

1object Companion

Companion object for the Style interface.

FontStyle 

1enum class FontStyle : Enum<Style.FontStyle>

Enumeration for font style variations.

Size 

1enum class Size : Enum<Style.Size>

Enumeration for font size options.

StyleImpl 

1data class StyleImpl(
2    val fontColor: String? = null,
3    val backgroundColor: String? = null,
4    val fontSize: Style.Size? = null,
5    val alignment: Style.Alignment? = null,
6    val fontStyle: Style.FontStyle? = null,
7    var span: Spanned? = null
8) : Style

Data class implementation of Style interface. Defines text appearance for push notifications with a span property containing rendered HTML.

Properties 

alignment 

1abstract val alignment: Style.Alignment?

Text alignment configuration.

backgroundColor 

1abstract val backgroundColor: String?

Background color for the styled text.

fontColor 

1abstract val fontColor: String?

Font color for the text.

fontSize 

1abstract val fontSize: Style.Size?

Font size specification.

fontStyle 

1abstract val fontStyle: Style.FontStyle?

Font style configuration.

Functions 

describeContents 

1open override fun describeContents(): Int

Parcelable implementation method describing contents.

writeToParcel 

1open override fun writeToParcel(parcel: Parcel, flags: Int)

Parcelable implementation for writing object data to a Parcel.

Parameters:

  • parcel - The Parcel to write to
  • flags - Additional flags for writing

Part of Salesforce Marketing Cloud Unified SDK 11.0.0