Package com.naver.ads.video.player
Class ResolvedCompanionAdViewGroup
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.ViewManager,android.view.ViewParent,android.view.accessibility.AccessibilityEventSource,com.naver.ads.video.player.UiElementView,com.naver.ads.video.player.Updatable
public abstract class ResolvedCompanionAdViewGroup extends UiElementViewGroup<ResolvedCompanion>
Implementation of UiElementViewGroup that handle ResolvedCompanion
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classResolvedCompanionAdViewGroup.FactoryA factory for ResolvedAdViewGroup instances.
-
Field Summary
Fields Modifier and Type Field Description private AdWebViewControlleradWebViewControllerprivate BooleanendCardprivate final VideoAdsRequestvideoAdsRequestprivate final ViewchildView
-
Constructor Summary
Constructors Constructor Description ResolvedCompanionAdViewGroup(Context context, CompanionAdSlot companionAdSlot, ResolvedCompanion preSelectedCompanion, List<ResolvedCompanion> companionCreatives)Constructs a new ResolvedCompanionAdViewGroup instance. ResolvedCompanionAdViewGroup(Context context, CompanionAdSlot companionAdSlot, ResolvedCompanion preSelectedCompanion)Constructs a new ResolvedCompanionAdViewGroup instance. ResolvedCompanionAdViewGroup(Context context, CompanionAdSlot companionAdSlot)Constructs a new ResolvedCompanionAdViewGroup instance.
-
Method Summary
Modifier and Type Method Description final AdWebViewControllergetAdWebViewController()the controller of the ad web view. final UnitsetAdWebViewController(AdWebViewController adWebViewController)the controller of the ad web view. final BooleangetEndCard()end card companion ad if trueotherwisefalsefinal UnitsetEndCard(Boolean endCard)end card companion ad if trueotherwisefalsefinal VideoAdsRequestgetVideoAdsRequest()the request of the video ads. final ViewgetChildView()companion ad will be rendered abstract UnitresolveImageViewResource(ResolvedCompanion resolvedCompanion, ResourcesProvider.Resource resource, VideoAdsRenderingOptions adsRenderingOptions)Resolves the image resource that will be rendered as an ImageView abstract UnitresolveWebViewResource(ResolvedCompanion resolvedCompanion, ResourcesProvider.Resource resource, VideoAdsRenderingOptions adsRenderingOptions)Resolves the web view resource that will be rendered as an WebView abstract BooleanhasEndCard()Returns trueif end card exists,falseotherwise.Unitinitialize(ResolvedCompanion trackingProvider, VideoAdsRequest adsRequest, VideoAdsRenderingOptions adsRenderingOptions)Initializes this instance with given trackingProvider, adsRequest and adsRenderingOptions. final ResolvedCompanionselectResolvedCompanion(Integer containerWidth, Integer containerHeight)Selects the best companion ad creative from a list of companion ad creative. final UnitsetChildView(View childView, ResolvedCompanion resolvedCompanion)abstract UnitsetEndCardChildView(ResolvedCompanion resolvedCompanion)abstract UnitsetConcurrentChildView(ResolvedCompanion resolvedCompanion)-
-
Constructor Detail
-
ResolvedCompanionAdViewGroup
ResolvedCompanionAdViewGroup(Context context, CompanionAdSlot companionAdSlot, ResolvedCompanion preSelectedCompanion, List<ResolvedCompanion> companionCreatives)
Constructs a new ResolvedCompanionAdViewGroup instance.- Parameters:
context- the context.preSelectedCompanion- the pre selected companion ad.
-
ResolvedCompanionAdViewGroup
ResolvedCompanionAdViewGroup(Context context, CompanionAdSlot companionAdSlot, ResolvedCompanion preSelectedCompanion)
Constructs a new ResolvedCompanionAdViewGroup instance.- Parameters:
context- the context.preSelectedCompanion- the pre selected companion ad.
-
ResolvedCompanionAdViewGroup
ResolvedCompanionAdViewGroup(Context context, CompanionAdSlot companionAdSlot)
Constructs a new ResolvedCompanionAdViewGroup instance.- Parameters:
context- the context.
-
-
Method Detail
-
getAdWebViewController
final AdWebViewController getAdWebViewController()
the controller of the ad web view.
-
setAdWebViewController
final Unit setAdWebViewController(AdWebViewController adWebViewController)
the controller of the ad web view.
-
getEndCard
final Boolean getEndCard()
end card companion ad if
trueotherwisefalse
-
setEndCard
final Unit setEndCard(Boolean endCard)
end card companion ad if
trueotherwisefalse
-
getVideoAdsRequest
final VideoAdsRequest getVideoAdsRequest()
the request of the video ads.
-
getChildView
final View getChildView()
companion ad will be rendered
-
resolveImageViewResource
abstract Unit resolveImageViewResource(ResolvedCompanion resolvedCompanion, ResourcesProvider.Resource resource, VideoAdsRenderingOptions adsRenderingOptions)
Resolves the image resource that will be rendered as an ImageView
- Parameters:
resolvedCompanion- the resolved companion.resource- the resource used to render the ImageView.adsRenderingOptions- the parameters that control the rendering of video ads.
-
resolveWebViewResource
abstract Unit resolveWebViewResource(ResolvedCompanion resolvedCompanion, ResourcesProvider.Resource resource, VideoAdsRenderingOptions adsRenderingOptions)
Resolves the web view resource that will be rendered as an WebView
- Parameters:
resolvedCompanion- the resolved companion.resource- the resource used to render the WebView.adsRenderingOptions- the parameters that control the rendering of video ads.
-
hasEndCard
abstract Boolean hasEndCard()
Returns
trueif end card exists,falseotherwise.
-
initialize
Unit initialize(ResolvedCompanion trackingProvider, VideoAdsRequest adsRequest, VideoAdsRenderingOptions adsRenderingOptions)
Initializes this instance with given trackingProvider, adsRequest and adsRenderingOptions.
- Parameters:
trackingProvider- the provider of tracking info.adsRequest- the request of video ads.adsRenderingOptions- the parameters that control the rendering of video ads.
-
selectResolvedCompanion
final ResolvedCompanion selectResolvedCompanion(Integer containerWidth, Integer containerHeight)
Selects the best companion ad creative from a list of companion ad creative.
-
setChildView
final Unit setChildView(View childView, ResolvedCompanion resolvedCompanion)
-
setEndCardChildView
abstract Unit setEndCardChildView(ResolvedCompanion resolvedCompanion)
-
setConcurrentChildView
abstract Unit setConcurrentChildView(ResolvedCompanion resolvedCompanion)
-
-
-
-