Class BannerAdSize

  • All Implemented Interfaces:

    
    public final class BannerAdSize
    extends PrivateBannerAdSize
                        

    The size of a banner ad.

    • Constructor Detail

    • Method Detail

      • 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).