public final class AdSize extends Object
The size of a banner ad.
Constant Summary
int | AUTO_HEIGHT | Constant that will cause the height of the ad to scale based on the height of the device in the current orientation. |
int | FULL_WIDTH | Constant that will cause the width of the ad to match the width of the device in the current orientation. |
Field Summary
public static final AdSize | BANNER | Mobile Marketing Association (MMA) banner ad size (320x50 density-independent pixels). |
public static final AdSize | FLUID | A dynamically sized banner that matches its parent's width and expands/contracts its height to match the ad's content after loading completes. |
public static final AdSize | FULL_BANNER | Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels). |
public static final AdSize | INVALID | An invalid AdSize that will cause the ad request to fail immediately. |
public static final AdSize | LARGE_BANNER | Large banner ad size (320x100 density-independent pixels). |
public static final AdSize | LEADERBOARD | Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels). |
public static final AdSize | MEDIUM_RECTANGLE | Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent pixels). |
public static final AdSize | SEARCH | A special variant of FLUID to be set on
SearchAdView
when loading a
DynamicHeightSearchAdRequest . |
public static final AdSize | SMART_BANNER | A dynamically sized banner that is full-width and auto-height. |
public static final AdSize | WIDE_SKYSCRAPER | IAB wide skyscraper ad size (160x600 density-independent pixels). |
Public Constructor Summary
Public Method Summary
boolean | |
static AdSize |
getCurrentOrientationAnchoredAdaptiveBannerAdSize(Context
context, int width)
Returns an
AdSize
with the given width and a Google-optimized height to create a banner ad.
|
static AdSize |
getCurrentOrientationBannerAdSizeWithWidth(Context
context, int width)
This method is deprecated. Use
getCurrentOrientationAnchoredAdaptiveBannerAdSize(Context, int)
instead.
|
int | |
int | |
static AdSize |
getLandscapeAnchoredAdaptiveBannerAdSize(Context
context, int width)
Returns an
AdSize
with the given width and a Google-optimized height to create a banner ad.
|
static AdSize |
getLandscapeBannerAdSizeWithWidth(Context
context, int width)
This method is deprecated. Use
getLandscapeAnchoredAdaptiveBannerAdSize(Context, int) instead.
|
static AdSize |
getPortraitAnchoredAdaptiveBannerAdSize(Context
context, int width)
Returns an
AdSize
with the given width and a Google-optimized height to create a banner ad.
|
static AdSize |
getPortraitBannerAdSizeWithWidth(Context
context, int width)
This method is deprecated. Use
getPortraitAnchoredAdaptiveBannerAdSize(Context, int) instead.
|
int | |
int | |
int |
hashCode()
|
boolean |
isAutoHeight()
Returns whether this
AdSize
is auto-height.
|
boolean | |
boolean |
isFullWidth()
Returns whether this
AdSize
is full-width.
|
String |
toString()
|