Class BannerAdSize
-
- All Implemented Interfaces:
public final class BannerAdSize extends PrivateBannerAdSizeThe size of a banner ad.
-
-
Method Summary
Modifier and Type Method Description final IntegergetHeight()final IntegergetWidth()final IntegergetHeightInPixels(Context context)Returns the actual height of this BannerAdSize in physical pixels. final IntegergetWidthInPixels(Context context)Returns the actual width of this BannerAdSize in physical pixels. final IntegergetHeight(Context context)Returns the actual height of this BannerAdSize in density-independent pixels (dp). final IntegergetWidth(Context context)Returns the actual width of this BannerAdSize in density-independent pixels (dp). Booleanequals(Object other)IntegerhashCode()StringtoString()final static BannerAdSizefixedSize(Context context, Integer width, Integer height)Returns fixed banner size. final static BannerAdSizestickySize(Context context, Integer width)Returns sticky banner size with the given width. final static BannerAdSizeinlineSize(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.
-
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).
-
-
-
-