NativeAdPalette
data class NativeAdPalette(val surface: Int, val surfaceContainer: Int, val onSurface: Int, val onSurfaceVariant: Int, val primary: Int, val secondaryContainer: Int, val onSecondaryContainer: Int, val surfaceContainerHighest: Int, val surfaceVariant: Int, val surfaceContainerHigh: Int = surfaceContainer, val tertiary: Int = primary, val tertiaryContainer: Int = secondaryContainer, val onTertiaryContainer: Int = onSecondaryContainer)(source)
An ARGB snapshot of the Compose theme, for the Android views that render an ad.
Ad assets have to live inside a real NativeAdView, which is a View and cannot read MaterialTheme. Snapshotting the colours the ad needs keeps the ad visually part of the app, including dynamic colour and in-app theme switches, without duplicating the palette in XML themes.
Constructors
Link copied to clipboard
constructor(surface: Int, surfaceContainer: Int, onSurface: Int, onSurfaceVariant: Int, primary: Int, secondaryContainer: Int, onSecondaryContainer: Int, surfaceContainerHighest: Int, surfaceVariant: Int, surfaceContainerHigh: Int = surfaceContainer, tertiary: Int = primary, tertiaryContainer: Int = secondaryContainer, onTertiaryContainer: Int = onSecondaryContainer)