Package-level declarations
Types
Alignment types used in native ad layout containers.
A node that renders a native ad asset (e.g., headline, icon, media). Each subtype binds to a specific field from the native ad data.
Style configuration for call-to-action buttons in native ad layouts.
Clipping shape for an AdModifier.
Colour roles used in native ad theming.
A container node that holds child AdNodes in a specific arrangement.
Style configuration for container nodes.
Content scale mode for images.
Visibility state for an AdModifier.
Font weight options.
Style configuration for image assets (icon, media) in native ad layouts.
Builder for the native ad layout DSL. Should only be instantiated via the adLayout top-level function.
DSL marker annotation that restricts lambda receivers in the native ad layout DSL. Ensures builders are scoped correctly and prevents accidental nesting of unrelated DSLs.
Sample data for previewing a native ad layout in AdLayoutPreview. All fields carry realistic defaults suitable for design-time rendering.
Receiver scope for the native ad layout DSL. Provides builder functions for every supported layout node and ad asset.
Sizing strategy for an AdModifier dimension.
A single validation issue found during AdLayoutValidator.validate.
Validates a native AdLayout tree.
A serialisable, platform-agnostic analogue of Compose Modifier for native ad layout nodes. Immutable value object — chaining methods return new copies with the applied change.
Base type for all nodes in a native ad layout tree. Every node carries an AdModifier for sizing, spacing, and appearance.
An empty spacer node used to create gaps in a layout.
A node that displays static (non-ad) text. Useful for labels, headers, or decorative text in native ad layouts.
Ready-made, policy-compliant native ad layout templates. Each template includes the required ad attribution badge and AdChoices space.
Text alignment options.
Style configuration for text nodes in native ad layouts. Includes font size, colour, weight, and alignment.
Controls layout behavior when a native ad asset is missing from the creative. HideWhenMissing removes the node entirely, losing its space. InvisibleWhenMissing keeps the space but renders nothing. KeepSpace always reserves the space, even when the asset is absent.
Functions
Top-level DSL entry point that builds an AdLayout tree. Single-child content becomes the root node; multi-child content is wrapped in a full-width AdContainerNode.Column.
Renders an AdLayout with sample preview data for Compose previews / design-time visualisation. Does not load a real ad. Use this in @Preview composables to verify your native ad layout's appearance.