public class

AppLovinAdSize

extends Object
java.lang.Object
   ↳ com.applovin.sdk.AppLovinAdSize

Class Overview

This class defines a size of an ad to be displayed. It is recommended to use default sizes that are declared in this class (BANNER, MREC, INTERSTITIAL)

Summary

Constants
int SPAN
Fields
public static final AppLovinAdSize BANNER This field is deprecated. Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.
public static final AppLovinAdSize INTERSTITIAL Represents a full-screen advertisement with high click-through rates that covers the underlying activity.
public static final AppLovinAdSize LEADER This field is deprecated. Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.
public static final AppLovinAdSize MREC This field is deprecated. Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.
Public Methods
static Set<AppLovinAdSize> allSizes()
Obtain a set of all available Ad Sizes.
static AppLovinAdSize fromString(String sizeName)
Create a size object from a string representation
int getHeight()
Get requested ad height
String getLabel()
Get a name of the ad size
int getWidth()
Get requested ad width
String toString()
Simply calls getLabel().
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int SPAN

Constant Value: -1 (0xffffffff)

Fields

public static final AppLovinAdSize BANNER

This field is deprecated.
Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.

Represents a 350x50 banner advertisement.

public static final AppLovinAdSize INTERSTITIAL

Represents a full-screen advertisement with high click-through rates that covers the underlying activity.

public static final AppLovinAdSize LEADER

This field is deprecated.
Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.

Represents a 728x90 leaderboard advertisement indented for tablets.

public static final AppLovinAdSize MREC

This field is deprecated.
Banners, MRecs and Leaders are deprecated and will be removed in a future SDK version.

Represents a 320x250, mostly square advertisement.

Public Methods

public static Set<AppLovinAdSize> allSizes ()

Obtain a set of all available Ad Sizes.

Returns
  • A set containing all available Ad Size objects.

public static AppLovinAdSize fromString (String sizeName)

Create a size object from a string representation

Parameters
sizeName Name of the size.
Returns
  • Ad size or null in case input string is null or unknown.

public int getHeight ()

Get requested ad height

Returns
  • Ad height

public String getLabel ()

Get a name of the ad size

Returns
  • Name of the ad size.

public int getWidth ()

Get requested ad width

Returns
  • Ad width

public String toString ()

Simply calls getLabel().

Returns
  • Name of the ad size.