Banner Ad Size
The size of a banner ad. Pass one of these to Moloco.createMolocoBanner.
Fixed sizes:
Adaptive sizes (InlineAdaptive and AnchoredAdaptive) — use these with adaptive / flex-slot bid requests:
The server sets the ad height from the bid response (creative height).
The container fills its parent's width (
MATCH_PARENT) by default.Passing
availableWidth(in dp) sets the rendered container to that fixed width. It is recommended to passavailableWidthfor adaptive bidding and set it to the samewMaxused in your adaptive / flex-slot bid request, so the requested and rendered widths match.Because the height isn't known until the bid response returns, host the returned Banner in a parent view with a
WRAP_CONTENTheight (or set it to the bid response / creative height if you already know it) so the creative is not clipped or padded.
The two adaptive variants render identically; they are separate types only so inline and anchored placements can be tracked separately in the SDK's internal health metrics.
Inheritors
Types
Anchored adaptive banner. The container fills its parent width by default; height is determined by the server from the bid response (creative height).
Inline adaptive banner. The container fills its parent width by default; height is determined by the server from the bid response (creative height).
Medium rectangle banner size (300×250dp).
Standard banner size (320×50dp).
Tablet leaderboard banner size (728×90dp).