Fixed size banner ads
Stay organized with collections
Save and categorize content based on your preferences.
The Google Mobile Ads SDK supports fixed ad sizes for situations where adaptive
banners ads don't meet your needs.
The following table lists the standard banner sizes.
Size in dp (WxH) |
Description |
Availability |
AdSize constant |
320x50 |
Banner |
Phones and tablets |
GADAdSizeBanner |
320x100 |
Large banner |
Phones and tablets |
GADAdSizeLargeBanner |
300x250 |
IAB medium rectangle |
Phones and tablets |
GADAdSizeMediumRectangle |
468x60 |
IAB full-size banner |
Tablets |
GADAdSizeFullBanner |
728x90 |
IAB leaderboard |
Tablets |
GADAdSizeLeaderboard |
To define a custom banner size, set your size using GADAdSizeFromCGSize
:
Swift
let adSize = GADAdSizeFromCGSize(CGSize(width: 250, height: 250))
Objective-C
GADAdSize size = GADAdSizeFromCGSize(CGSizeMake(250, 250));
Fixed size banner ads example
Swift
Objective-C
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-25 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-25 UTC."],[[["The Google Mobile Ads SDK offers fixed ad sizes as an alternative to adaptive banners."],["Standard banner sizes include Banner (320x50), Large Banner (320x100), IAB medium rectangle (300x250), IAB full-size banner (468x60), and IAB leaderboard (728x90), each with specified availability for phones and/or tablets."],["Custom banner sizes can be defined using `GADAdSizeFromCGSize` by providing the desired width and height."],["Code examples for implementing fixed size banner ads are available in both Swift and Objective-C."]]],[]]