firebase:: gma:: AdSize
#include <types.h>
The size of a banner ad.
Summary
Constructors and Destructors |
|
---|---|
AdSize(uint32_t width, uint32_t height)
Creates a new AdSize.
|
Public types |
|
---|---|
Orientation{
|
enum Denotes the orientation of the AdSize. |
Type{
|
enum Denotes the type size object that the AdSize represents. |
Public static attributes |
|
---|---|
kBanner
|
const AdSize
Mobile Marketing Association (MMA) banner ad size (320x50 density-independent pixels).
|
kFullBanner
|
const AdSize
Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels).
|
kLargeBanner
|
const AdSize
Taller version of kBanner. Typically 320x100.
|
kLeaderboard
|
const AdSize
Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels).
|
kMediumRectangle
|
const AdSize
Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent pixels).
|
Public functions |
|
---|---|
height() const
|
uint32_t
The height of the region represented by this AdSize.
|
operator!=(const AdSize & rhs) const
|
bool
Comparison operator.
|
operator==(const AdSize & rhs) const
|
bool
Comparison operator.
|
orientation() const
|
The AdSize orientation.
|
type() const
|
The AdSize type, either standard size or adaptive.
|
width() const
|
uint32_t
The width of the region represented by this AdSize.
|
Public static functions |
|
---|---|
GetCurrentOrientationAnchoredAdaptiveBannerAdSize(uint32_t width)
|
Creates an AdSize with the given width and a Google-optimized height to create a banner ad given the current orientation.
|
GetCurrentOrientationInlineAdaptiveBannerAdSize(int width)
|
A convenience method to return an inline adaptive banner ad size given the current interface orientation.
|
GetInlineAdaptiveBannerAdSize(int width, int max_height)
|
This ad size is most suitable for banner ads given a maximum height.
|
GetLandscapeAnchoredAdaptiveBannerAdSize(uint32_t width)
|
Creates an AdSize with the given width and a Google-optimized height to create a banner ad in landscape mode.
|
GetLandscapeInlineAdaptiveBannerAdSize(int width)
|
Creates an AdSize with the given width and the device’s landscape height.
|
GetPortraitAnchoredAdaptiveBannerAdSize(uint32_t width)
|
Creates an AdSize with the given width and a Google-optimized height to create a banner ad in portrait mode.
|
GetPortraitInlineAdaptiveBannerAdSize(int width)
|
Creates an AdSize with the given width and the device’s portrait height.
|
Public types
Orientation
Orientation
Type
Type
Public static attributes
kBanner
const AdSize kBanner
Mobile Marketing Association (MMA) banner ad size (320x50 density-independent pixels).
kFullBanner
const AdSize kFullBanner
Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels).
kLeaderboard
const AdSize kLeaderboard
Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels).
kMediumRectangle
const AdSize kMediumRectangle
Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent pixels).
Public functions
AdSize
AdSize( uint32_t width, uint32_t height )
Creates a new AdSize.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
height
uint32_t height() const
The height of the region represented by this AdSize.
Value is in density-independent pixels.
width
uint32_t width() const
The width of the region represented by this AdSize.
Value is in density-independent pixels.
Public static functions
GetCurrentOrientationAnchoredAdaptiveBannerAdSize
AdSize GetCurrentOrientationAnchoredAdaptiveBannerAdSize( uint32_t width )
Creates an AdSize with the given width and a Google-optimized height to create a banner ad given the current orientation.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
an AdSize with the given width and a Google-optimized height to create a banner ad. The size returned will have an aspect ratio similar to AdSize, suitable for anchoring near the top or bottom of your app. The exact size of the ad returned can be retrieved by calling AdView::ad_size once the ad has been loaded.
|
GetCurrentOrientationInlineAdaptiveBannerAdSize
AdSize GetCurrentOrientationInlineAdaptiveBannerAdSize( int width )
A convenience method to return an inline adaptive banner ad size given the current interface orientation.
This AdSize allows Google servers to choose an optimal ad size with a height less than or equal to the height of the screen in the requested orientation.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
an AdSize with the given width and a height that is always 0. The exact size of the ad returned can be retrieved by calling AdView::ad_size once the ad has been loaded.
|
GetInlineAdaptiveBannerAdSize
AdSize GetInlineAdaptiveBannerAdSize( int width, int max_height )
This ad size is most suitable for banner ads given a maximum height.
This AdSize allows Google servers to choose an optimal ad size with a height less than or equal to the max height given in
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
an AdSize with the given width and a height that is always 0. The exact size of the ad returned can be retrieved by calling AdView::ad_size once the ad has been loaded.
|
GetLandscapeAnchoredAdaptiveBannerAdSize
AdSize GetLandscapeAnchoredAdaptiveBannerAdSize( uint32_t width )
Creates an AdSize with the given width and a Google-optimized height to create a banner ad in landscape mode.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
an AdSize with the given width and a Google-optimized height to create a banner ad. The size returned will have an aspect ratio similar to BANNER, suitable for anchoring near the top or bottom of your app. The exact size of the ad returned can be retrieved by calling AdView::ad_size once the ad has been loaded.
|
GetLandscapeInlineAdaptiveBannerAdSize
AdSize GetLandscapeInlineAdaptiveBannerAdSize( int width )
Creates an AdSize with the given width and the device’s landscape height.
This ad size allows Google servers to choose an optimal ad size with a height less than or equal to the height of the screen in landscape orientation.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
an AdSize with the given width and a height that is always 0. The exact size of the ad returned can be retrieved by calling AdView::ad_size once the ad has been loaded.
|
GetPortraitAnchoredAdaptiveBannerAdSize
AdSize GetPortraitAnchoredAdaptiveBannerAdSize( uint32_t width )
Creates an AdSize with the given width and a Google-optimized height to create a banner ad in portrait mode.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
an AdSize with the given width and a Google-optimized height to create a banner ad. The size returned will have an aspect ratio similar to BANNER, suitable for anchoring near the top or bottom of your app. The exact size of the ad returned can be retrieved by calling AdView::ad_size once the ad has been loaded.
|
GetPortraitInlineAdaptiveBannerAdSize
AdSize GetPortraitInlineAdaptiveBannerAdSize( int width )
Creates an AdSize with the given width and the device’s portrait height.
This ad size allows Google servers to choose an optimal ad size with a height less than or equal to the height of the screen in portrait orientation.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
an AdSize with the given width and a height that is always 0. The exact size of the ad returned can be retrieved by calling AdView::ad_size once the ad has been loaded.
|