Android SDK Version
- AbstractAdListener
- Ad
- AdChoicesView
- AdError
- AdIconView
- AdListener
- AdOptionsView
- AdOptionsView.Orientation
- AdSettings
- AdSettings.IntegrationErrorMode
- AdSettings.MultiprocessSupportMode
- AdSettings.TestAdType
- AdSize
- AdView
- AudienceNetworkActivity
- AudienceNetworkAds
- AudienceNetworkAds.AdFormat
- AudienceNetworkAds.InitListener
- AudienceNetworkAds.InitResult
- AudienceNetworkAds.InitSettingsBuilder
- BidderTokenProvider
- CacheFlag
- DefaultMediaViewVideoRenderer
- ExtraHints
- ExtraHints.Builder
- ExtraHints.HintType
- ExtraHints.Keyword
- InstreamVideoAdListener
- InstreamVideoAdView
- InterstitialAd
- InterstitialAdExtendedListener
- InterstitialAdListener
- MediaView
- MediaViewListener
- MediaViewVideoRenderer
- MediaViewVideoRendererWithBackgroundPlayback
- NativeAd
- NativeAd.AdCreativeType
- NativeAdBase
- NativeAdBase.Image
- NativeAdBase.MediaCacheFlag
- NativeAdBase.NativeComponentTag
- NativeAdBase.Rating
- NativeAdLayout
- NativeAdListener
- NativeAdScrollView
- NativeAdScrollView.AdViewProvider
- NativeAdsManager
- NativeAdsManager.Listener
- NativeAdView
- NativeAdView.Type
- NativeAdViewAttributes
- NativeBannerAd
- NativeBannerAdView
- NativeBannerAdView.Type
- RewardData
- RewardedVideoAd
- RewardedVideoAdExtendedListener
- RewardedVideoAdListener
- S2SRewardedVideoAdExtendedListener
- S2SRewardedVideoAdListener
- VideoAutoplayBehavior
- VideoStartReason
- java.lang.Object
- com.facebook.ads.AdSize
All Implemented Interfaces:
java.io.Serializable
public class AdSize
extends java.lang.Object
implements java.io.Serializable
AdSize is the dimension of the ad control. All units are in density-independent pixel (dp).
Field Summary
Modifier and Type | Field and Description |
---|---|
static AdSize | BANNER_320_50 Deprecated. |
static AdSize | BANNER_HEIGHT_50 Represents a flexible banner ad size, where banner width depends on its container width, and banner height is fixed as 50dp. |
static AdSize | BANNER_HEIGHT_90 Represents a flexible banner ad size, where banner width depends on its container width, and banner height is fixed as 90dp. |
static AdSize | INTERSTITIAL A full screen interstitial size. |
static AdSize | RECTANGLE_HEIGHT_250 Represents a flexible rectangle ad size, where width depends on its container width, and height is fixed as 250dp. |
Field Detail
BANNER_320_50
@Deprecated public static final AdSize BANNER_320_50
Deprecated.
A banner size of 320 x 50 dp.
BANNER_HEIGHT_50
public static final AdSize BANNER_HEIGHT_50
Represents a flexible banner ad size, where banner width depends on its container width, and banner height is fixed as 50dp.
BANNER_HEIGHT_90
public static final AdSize BANNER_HEIGHT_90
Represents a flexible banner ad size, where banner width depends on its container width, and banner height is fixed as 90dp.
RECTANGLE_HEIGHT_250
public static final AdSize RECTANGLE_HEIGHT_250
Represents a flexible rectangle ad size, where width depends on its container width, and height is fixed as 250dp.
Method Detail
getWidth
public int getWidth()
Gets the width of the ad control.
Returns:
width of the ad control in DP
Since:
4.6
getHeight
public int getHeight()
Gets the height of the ad control.
Returns:
height of the ad control in DP
Since:
4.6
fromWidthAndHeight
public static AdSize fromWidthAndHeight(int width, int height)
equals
public boolean equals(java.lang.Object o)
Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
Overrides:
hashCode
in class java.lang.Object