public class AdSize
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static AdSize |
SIZE_1024x50
Defines an ad to be 1024dp W x 50dp H.
|
static AdSize |
SIZE_300x250
Defines an ad to be 300dp W x 250dp H.
|
static AdSize |
SIZE_320x50
Defines an ad to be 320dp W x 50dp H.
|
static AdSize |
SIZE_600x90
Defines an ad to be 600dp W x 90dp H.
|
static AdSize |
SIZE_728x90
Defines an ad to be 728dp W x 90dp H.
|
static AdSize |
SIZE_AUTO
Defines an ad to be sized automatically.
|
static AdSize |
SIZE_AUTO_NO_SCALE
Defines an ad to be sized automatically, but not to scale the ad up to fit
the container it is in.
|
Constructor and Description |
---|
AdSize(int width,
int height)
Constructs an ad size with a specified width and height.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canUpscale()
Whether or not the ad can upscale larger than its true device-independent pixel size.
|
AdSize |
disableScaling()
Disables upscaling of the ads size.
|
boolean |
equals(java.lang.Object obj)
Determines if this AdSize is equivalent to the given object.
|
int |
getGravity()
Gets the gravity value currently set.
|
int |
getHeight()
Gets the height.
|
int |
getWidth()
Gets the width.
|
boolean |
isAuto()
Gets whether the size is set to be automatically determined.
|
AdSize |
newGravity(int gravity)
Creates a copy of this AdSize but with the layout gravity changed to the value provided.
|
java.lang.String |
toString()
Gets the size as a string.
|
public static final AdSize SIZE_320x50
public static final AdSize SIZE_300x250
public static final AdSize SIZE_600x90
public static final AdSize SIZE_728x90
public static final AdSize SIZE_1024x50
public static final AdSize SIZE_AUTO
public static final AdSize SIZE_AUTO_NO_SCALE
public AdSize(int width, int height)
width
- The width.height
- The height.public AdSize newGravity(int gravity)
gravity
- the gravity setting to use (see android.view.Gravity)public int getGravity()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the AdSize to compare this AdSize topublic int getWidth()
public int getHeight()
public boolean isAuto()
public boolean canUpscale()
public AdSize disableScaling()