AdModifier
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.
Parameters
Width sizing policy (Wrap, Match, or Fixed).
Height sizing policy (Wrap, Match, or Fixed).
Minimum width in dp.
Minimum height in dp.
Inner padding insets.
Outer margin insets.
Flex weight for linear layouts.
Width/height aspect ratio.
Background colour as ARGB long.
Border stroke width in dp.
Border colour as ARGB long.
Border corner radius in dp.
Corner radius in dp (also sets clip shape).
Opacity (0f–1f).
Maximum width constraint in dp.
Maximum height constraint in dp.
Horizontal offset in dp.
Vertical offset in dp.
Stacking order.
Shadow elevation in dp.
Clipping shape (None, Bounds, Circle, RoundedCorner).
Visibility mode (Visible, Invisible, Gone).
Constructors
Types
Companion with factory functions that start from an empty AdModifier.
Properties
Functions
Sets opacity (0f–1f).
Sets aspect ratio (must be > 0).
Sets a background colour.
Clips content to a circle.
Clips content with rounded corners.
Clips content to bounds.
Rounds corners and sets clip shape.
Sets shadow elevation.
Fills the available height.
Fills both available width and height.
Fills the available width.
Makes the node gone (removed from layout).
Sets a fixed height.
Sets height min/max constraints.
Makes the node invisible (still occupies space).
Applies uniform margin on all sides.
Applies horizontal and vertical margin.
Applies per-side margin.
Fills both available width and height. Alias for fillMaxSize.
Sets a maximum height.
Sets a maximum width.
Sets a minimum height.
Sets a minimum width.
Applies an offset.
Applies uniform padding on all sides.
Applies horizontal and vertical padding.
Applies per-side padding.
Sets shadow elevation. Alias for elevation.
Sets a fixed size (same width and height).
Sets a fixed width and height.
Makes the node visible.
If visible is true, makes visible; otherwise gone.
Sets flex weight (must be > 0).
Sets a fixed width.
Sets width min/max constraints.
Wraps content height.
Wraps content width and height.
Wraps content width.
Sets z-index (stacking order).