Android SDK Version
- AbstractAdListener
- Ad
- Ad.LoadAdConfig
- Ad.LoadConfigBuilder
- AdError
- AdExperienceType
- AdListener
- AdOptionsView
- AdOptionsView.Orientation
- AdSDKNotificationListener
- AdSDKNotificationListener.SDKEventKey
- AdSDKNotificationListener.SDKEventType
- AdSDKNotificationManager
- AdSettings
- AdSettings.IntegrationErrorMode
- AdSettings.TestAdType
- AdSize
- AdView
- AdView.AdViewLoadConfig
- AdView.AdViewLoadConfigBuilder
- AudienceNetworkActivity
- AudienceNetworkAds
- AudienceNetworkAds.AdFormat
- AudienceNetworkAds.InitListener
- AudienceNetworkAds.InitResult
- AudienceNetworkAds.InitSettingsBuilder
- AudienceNetworkContentProvider
- BidderTokenProvider
- CacheFlag
- DefaultMediaViewVideoRenderer
- ExtraHints
- ExtraHints.Builder
- ExtraHints.HintType
- ExtraHints.Keyword
- FullScreenAd
- FullScreenAd.ShowAdConfig
- FullScreenAd.ShowConfigBuilder
- InterstitialAd
- InterstitialAd.InterstitialAdLoadConfigBuilder
- InterstitialAd.InterstitialAdShowConfigBuilder
- InterstitialAd.InterstitialLoadAdConfig
- InterstitialAd.InterstitialShowAdConfig
- InterstitialAdExtendedListener
- InterstitialAdListener
- MediaView
- MediaViewListener
- MediaViewVideoRenderer
- MediaViewVideoRendererWithBackgroundPlayback
- NativeAd
- NativeAd.AdCreativeType
- NativeAdBase
- NativeAdBase.Image
- NativeAdBase.MediaCacheFlag
- NativeAdBase.NativeAdLoadConfigBuilder
- NativeAdBase.NativeComponentTag
- NativeAdBase.NativeLoadAdConfig
- NativeAdBase.Rating
- NativeAdLayout
- NativeAdListener
- NativeAdScrollView
- NativeAdScrollView.AdViewProvider
- NativeAdsManager
- NativeAdsManager.Listener
- NativeAdView
- NativeAdView.Type
- NativeAdViewAttributes
- NativeBannerAd
- NativeBannerAdView
- NativeBannerAdView.Type
- RewardData
- RewardedAdListener
- RewardedInterstitialAd
- RewardedInterstitialAd.RewardedInterstitialAdLoadConfigBuilder
- RewardedInterstitialAd.RewardedInterstitialAdShowConfigBuilder
- RewardedInterstitialAd.RewardedInterstitialLoadAdConfig
- RewardedInterstitialAd.RewardedInterstitialShowAdConfig
- RewardedInterstitialAdExtendedListener
- RewardedInterstitialAdListener
- RewardedVideoAd
- RewardedVideoAd.RewardedVideoAdLoadConfigBuilder
- RewardedVideoAd.RewardedVideoAdShowConfigBuilder
- RewardedVideoAd.RewardedVideoLoadAdConfig
- RewardedVideoAd.RewardedVideoShowAdConfig
- RewardedVideoAdExtendedListener
- RewardedVideoAdListener
- S2SRewardedInterstitialAdExtendedListener
- S2SRewardedInterstitialAdListener
- S2SRewardedVideoAdExtendedListener
- S2SRewardedVideoAdListener
- VideoAutoplayBehavior
- VideoStartReason
- java.lang.Object
- FrameLayout
- com.facebook.ads.internal.api.AdComponentFrameLayout
- com.facebook.ads.AdOptionsView
All Implemented Interfaces:
com.facebook.ads.internal.api.AdComponentView
public class AdOptionsView
extends com.facebook.ads.internal.api.AdComponentFrameLayout
A clickable Ad Options icon, which presents the user with options to report and hide an ad. Should be added to Native Ads to present the users with these options. Create an AdOptionsView by calling:
AdOptionsView adOptionsView = new AdOptionsView(context, nativeAdBase, nativeAdLayout); addView(adOptionsView);
You can define extra params, such as the orientation of the icons in the view and the size of the icons by calling:
AdOptionsView adOptionsView = new AdOptionsView(context, nativeAdBase, nativeAdLayout, orientation, iconSizeDp); addView(adOptionsView);
Please note that there is a minimum size for the icon, set at 23dp.
You can also change the colors and the size of the icon by calling:
AdOptionsView adOptionsView = new AdOptionsView(context, nativeAdBase, nativeAdLayout); adOptionsView.setIconColor(newColor); adOptionsView.setIconSizeDp(newIconSizeDp); addView(adOptionsView);
Since:
5.1
Constructor Summary
Constructor and Description |
---|
AdOptionsView(Context context, NativeAdBase nativeAdBase, NativeAdLayout nativeAdLayout) Initializes the AdOptionsView with default Horizontal orientation and minimum possible size for the icons. |
AdOptionsView(Context context, NativeAdBase nativeAdBase, NativeAdLayout nativeAdLayout, AdOptionsView.Orientation orientation, int iconSizeDp) Initializes the AdOptionsView with custom orientation and icon size. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void | setIconColor(int color) Sets the color of the icons. |
void | setIconSizeDp(int iconSizeDp) Sets the size of the icons in dp. |
void | setSingleIcon(boolean singleIcon) This view displays the ad choices and ad reporting icons by default. |
Constructor Detail
AdOptionsView
public AdOptionsView(Context context, NativeAdBase nativeAdBase, NativeAdLayout nativeAdLayout)
Initializes the AdOptionsView with default Horizontal orientation and minimum possible size for the icons.
Parameters:
context
- The application context.nativeAdBase
- The native ad base.nativeAdLayout
- The native ad layout.AdOptionsView
public AdOptionsView(Context context, NativeAdBase nativeAdBase, NativeAdLayout nativeAdLayout, AdOptionsView.Orientation orientation, int iconSizeDp)
Initializes the AdOptionsView with custom orientation and icon size.
Parameters:
context
- The application context.nativeAdBase
- The native ad base.nativeAdLayout
- The native ad layout.orientation
- The orientation you want the icons to be in: horizontal or vertical.iconSizeDp
- The required icon size in dp - this will be converted to pixels.Method Detail
setIconColor
public void setIconColor(int color)
Sets the color of the icons.
Parameters:
color
- the color you want to set.setIconSizeDp
public void setIconSizeDp(int iconSizeDp)
Sets the size of the icons in dp.
Parameters:
iconSizeDp
- Thew new icon size.setSingleIcon
public void setSingleIcon(boolean singleIcon)
This view displays the ad choices and ad reporting icons by default. The click action is the same for both. By calling this method with 'true' we will only display the ad choices icon. This is convenient in layouts where fewer space is available.
Parameters:
singleIcon
- Whether we should use only one of the icons.