Class BannerAdSize
-
- All Implemented Interfaces:
public final class BannerAdSize
The size of a banner ad.
-
-
Method Summary
Modifier and Type Method Description final Integer
getHeight()
final Integer
getWidth()
final Integer
getHeightInPixels(Context context)
Returns the actual height of this BannerAdSize in physical pixels. final Integer
getWidthInPixels(Context context)
Returns the actual width of this BannerAdSize in physical pixels. final Integer
getHeight(Context context)
Returns the actual height of this BannerAdSize in density-independent pixels (dp). final Integer
getWidth(Context context)
Returns the actual width of this BannerAdSize in density-independent pixels (dp). <Error class: unknown class>
getPrivateSizeInfo()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static BannerAdSize
fixedSize(Context context, Integer width, Integer height)
Returns fixed banner size. final static BannerAdSize
stickySize(Context context, Integer width)
Returns sticky banner size with the given width. final static BannerAdSize
inlineSize(Context context, Integer width, Integer maxHeight)
Returns inline adaptive banner size. -
-
Method Detail
-
getHeightInPixels
final Integer getHeightInPixels(Context context)
Returns the actual height of this BannerAdSize in physical pixels. AdSize created with FULL_HEIGHT will return height of the screen.
- Parameters:
context
- Any Context.
-
getWidthInPixels
final Integer getWidthInPixels(Context context)
Returns the actual width of this BannerAdSize in physical pixels. AdSize created with FULL_WIDTH will return width of the screen.
- Parameters:
context
- Any Context.
-
getHeight
final Integer getHeight(Context context)
Returns the actual height of this BannerAdSize in density-independent pixels (dp). AdSize created with FULL_HEIGHT will return height of the screen.
- Parameters:
context
- Any Context.
-
getWidth
final Integer getWidth(Context context)
Returns the actual width of this BannerAdSize in density-independent pixels (dp). AdSize created with FULL_WIDTH will return width of the screen.
- Parameters:
context
- Any Context.
-
getPrivateSizeInfo
<Error class: unknown class> getPrivateSizeInfo()
-
fixedSize
final static BannerAdSize fixedSize(Context context, Integer width, Integer height)
Returns fixed banner size.
- Parameters:
context
- The Context.width
- The width of the ad container in density-independent pixels (dp).height
- The height of the ad container in density-independent pixels (dp).
-
stickySize
final static BannerAdSize stickySize(Context context, Integer width)
Returns sticky banner size with the given width.
- Parameters:
context
- The Context.width
- The width of the ad container in density-independent pixels (dp).
-
inlineSize
final static BannerAdSize inlineSize(Context context, Integer width, Integer maxHeight)
Returns inline adaptive banner size. Banners with inline sizes stretch to container width and height when possible.
- Parameters:
width
- The width of the ad container in density-independent pixels (dp).maxHeight
- The maximum height of the ad container in density-independent pixels (dp).
-
-
-
-