java.lang.Object | |
↳ | com.google.android.gms.ads.AdSize |
The size of a banner ad.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BANNER | Mobile Marketing Association (MMA) banner ad size (320x50 density-independent pixels). | ||||||||||
FULL_BANNER | Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels). | ||||||||||
LARGE_BANNER | Large banner ad size (320x100 density-independent pixels). | ||||||||||
LEADERBOARD | Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels). | ||||||||||
MEDIUM_RECTANGLE | Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent pixels). | ||||||||||
SMART_BANNER | A dynamically sized banner that is full-width and auto-height. | ||||||||||
WIDE_SKYSCRAPER | IAB wide skyscraper ad size (160x600 density-independent pixels). |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new
AdSize .
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Compares this
AdSize with the specified object and indicates if they are equal.
| |||||||||||
Returns the height of this
AdSize in density-independent pixels.
| |||||||||||
Returns the height of this
AdSize in physical pixels.
| |||||||||||
Returns the width of this
AdSize in density-independent pixels.
| |||||||||||
Returns the width of this
AdSize in physical pixels.
| |||||||||||
Returns whether this
AdSize is auto-height.
| |||||||||||
Returns whether this
AdSize is full-width.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constant that will cause the height of the ad to scale based on the height of the device in
the current orientation. An AUTO_HEIGHT
ad determines its height during
initialization of the AdView
and never changes after that.
Constant that will cause the width of the ad to match the width of the device in the current
orientation. A FULL_WIDTH
ad determines its width during initialization of the
AdView
and never changes after that.
Mobile Marketing Association (MMA) banner ad size (320x50 density-independent pixels).
Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels).
Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels).
Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent pixels).
A dynamically sized banner that is full-width and auto-height.
IAB wide skyscraper ad size (160x600 density-independent pixels). This size is currently not supported by the Google Mobile Ads network; this is intended for mediation ad networks only.
Create a new AdSize
.
width | The width of the ad in density-independent pixels. |
---|---|
height | The height of the ad in density-independent pixels. |
IllegalArgumentException | If the width or height is negative. |
---|
Compares this AdSize
with the specified object and indicates if they are equal.
Returns the height of this AdSize
in physical pixels.