Package com.naver.ads.video.player
Class DefaultCompanionAdViewGroup
-
- 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 final class DefaultCompanionAdViewGroup extends ResolvedCompanionAdViewGroup
A default implementation of ResolvedCompanionAdViewGroup.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classDefaultCompanionAdViewGroup.Factory
-
Method Summary
Modifier and Type Method Description UnitonMeasure(Integer widthMeasureSpec, Integer heightMeasureSpec)UnitsetEventListener(UiElementViewGroup.EventListener eventListener)Specified the event listener to which vast events must be sent. UnitresolveWebViewResource(ResolvedCompanion resolvedCompanion, ResourcesProvider.Resource resource, VideoAdsRenderingOptions adsRenderingOptions)Resolves the web view resource that will be rendered as an WebView UnitresolveImageViewResource(ResolvedCompanion resolvedCompanion, ResourcesProvider.Resource resource, VideoAdsRenderingOptions adsRenderingOptions)Resolves the image resource that will be rendered as an ImageView UnitsetEndCardChildView(ResolvedCompanion resolvedCompanion)UnitsetConcurrentChildView(ResolvedCompanion resolvedCompanion)BooleanhasEndCard()Returns trueif end card exists,falseotherwise.UnitaddView(View child, Integer index, ViewGroup.LayoutParams params)Adds given child view with the specified params. UnitremoveView(View view)UnitremoveAllViews()UnitinternalUpdate(VideoAdState state, VideoProgressUpdate adProgress, Boolean muted)Propagates state and adProgress to the UiElementViews managed by UiElementViewGroupManager internally. UnitbringChildToFront(View child)-
-
Method Detail
-
setEventListener
Unit setEventListener(UiElementViewGroup.EventListener eventListener)
Specified the event listener to which vast events must be sent.
- Parameters:
eventListener- the event listener.
-
resolveWebViewResource
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.
-
resolveImageViewResource
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.
-
setEndCardChildView
Unit setEndCardChildView(ResolvedCompanion resolvedCompanion)
-
setConcurrentChildView
Unit setConcurrentChildView(ResolvedCompanion resolvedCompanion)
-
hasEndCard
Boolean hasEndCard()
Returns
trueif end card exists,falseotherwise.
-
addView
Unit addView(View child, Integer index, ViewGroup.LayoutParams params)
- Parameters:
child- the child view to add.index- the position at which to add the child or -1 to add last.params- the layout parameters to set on the child.
-
removeView
Unit removeView(View view)
-
removeAllViews
Unit removeAllViews()
-
internalUpdate
Unit internalUpdate(VideoAdState state, VideoProgressUpdate adProgress, Boolean muted)
Propagates state and adProgress to the UiElementViews managed by UiElementViewGroupManager internally.
Derived classes with children should override this method.
-
bringChildToFront
Unit bringChildToFront(View child)
-
-
-
-