AdSize class
This is an archived version of the documentation. Actual documentation for all platforms can be found here.
This class is responsible for the banner size.
Methods
static AdSize StickySize (int width) | Creates an AdSize class object with the specified width of a “sticky” banner. Banner height depends on what types of ad units are selected in the Partner interface. |
static AdSize FlexibleSize (int width, int height) | Creates an AdSize class object with the specified maximum height and width of the banner. Banner height depends on what types of ad units are selected in the Partner interface. |
static AdSize StickySize (int width) | Creates an AdSize class object with the specified width of a “sticky” banner. Banner height depends on what types of ad units are selected in the Partner interface. |
static AdSize FlexibleSize (int width, int height) | Creates an AdSize class object with the specified maximum height and width of the banner. Banner height depends on what types of ad units are selected in the Partner interface. |
Properties
int Width { get } | Width of the banner. . |
int Height { get } | Height of the banner. |
AdSizeType AdSizeType { get } | The size of the banner. |
int Width { get } | Width of the banner. . |
int Height { get } | Height of the banner. |
AdSizeType AdSizeType { get } | The size of the banner. |
Fields
public static readonly AdSize BANNER_240x400 (deprecated) | A banner of the 240x400 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_300x250 (deprecated) | A banner of the 300x250 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_300x300 (deprecated) | A banner of the 300x300 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_320x50 (deprecated) | A banner of the 320x50 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_320x100 (deprecated) | A banner of the 320x100 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_400x240 (deprecated) | A banner of the 400x240 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_728x90 (deprecated) | A banner of the 728x90 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_240x400 (deprecated) | A banner of the 240x400 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_300x250 (deprecated) | A banner of the 300x250 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_300x300 (deprecated) | A banner of the 300x300 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_320x50 (deprecated) | A banner of the 320x50 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_320x100 (deprecated) | A banner of the 320x100 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_400x240 (deprecated) | A banner of the 400x240 size in dp (density-independent pixels). . |
public static readonly AdSize BANNER_728x90 (deprecated) | A banner of the 728x90 size in dp (density-independent pixels). . |
Method description
StickySize(int width)
static AdSize YandexMobileAds.Base.AdSize.StickySize (int width)
Creates an AdSize class object with the specified width of a “sticky” banner. Banner height depends on what types of ad units are selected in the Partner interface.
width | The width of a “sticky” banner. |
width | The width of a “sticky” banner. |
Returns:
An object of the AdSize
class with a given width of a “sticky” banner.
FlexibleSize (int width, int height)
static AdSize YandexMobileAds.Base.AdSize.FlexibleSize (int width, int height)
Creates an AdSize class object with the specified maximum height and width of the banner. Banner height depends on what types of ad units are selected in the Partner interface.
width | The maximum width of the banner. |
height | The maximum height of the banner. |
width | The maximum width of the banner. |
height | The maximum height of the banner. |
Returns:
An object of the AdSize
class with the specified maximum width and height of the banner.
Property description
int Width { get }
public int Width { get }
Width of the banner.
int Height { get }
public int Height { get }
Height of the banner.
int Height { get }
public AdSizeType AdSizeType { get }
The size of the banner.
Field description
public static readonly AdSize BANNER_240x400 (deprecated)
public static readonly AdSize BANNER_240x400 = new AdSize {Width = 240, Height = 400, AdSizeType = AdSizeType.Fixed}
A banner of the 240x400 size in dp (density-independent pixels).
public static readonly AdSize BANNER_300x250 (deprecated)
public static readonly AdSize BANNER_300x250 = new AdSize {Width = 300, Height = 250, AdSizeType = AdSizeType.Fixed}
A banner of the 300x250 size in dp (density-independent pixels).
public static readonly AdSize BANNER_300x300 (deprecated)
public static readonly AdSize BANNER_300x250 = new AdSize {Width = 300, Height = 300, AdSizeType = AdSizeType.Fixed}
A banner of the 300x300 size in dp (density-independent pixels).
public static readonly AdSize BANNER_320x50 (deprecated)
public static readonly AdSize BANNER_320x50 = new AdSize {Width = 320, Height = 50, AdSizeType = AdSizeType.Fixed}
A banner of the 320x50 size in dp (density-independent pixels).
public static readonly AdSize BANNER_320x100 (deprecated)
public static readonly AdSize BANNER_320x100 = new AdSize {Width = 320, Height = 100, AdSizeType = AdSizeType.Fixed}
A banner of the 320x100 size in dp (density-independent pixels).
public static readonly AdSize BANNER_400x240 (deprecated)
public static readonly AdSize BANNER_400x240 = new AdSize {Width = 400, Height = 240, AdSizeType = AdSizeType.Fixed}
A banner of the 400x240 size in dp (density-independent pixels).
public static readonly AdSize BANNER_728x90 (deprecated)
public static readonly AdSize BANNER_728x90 = new AdSize {Width = 728, Height = 90, AdSizeType = AdSizeType.Fixed}
A banner of the 728x90 size in dp (density-independent pixels).