Package com.naver.ads.video.player
Class UiElementViewGroup
-
- 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 UiElementViewGroup<TTrackingProvider extends TrackingProvider> extends FrameLayout implements UiElementView<TTrackingProvider>
Defines the ViewGroup for continuous visibility into the lifecycle of video ads.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceUiElementViewGroup.EventListenerAn event listener receives notifications from an vast. Notification indicate vast related events, such as the user activated a skip control to skip the creative.
public interfaceUiElementViewGroup.FactoryA factory for UiElementViewGroup instances.
-
Field Summary
Fields Modifier and Type Field Description private final UiElementViewGroupManageruiElementViewManagerprivate final VideoAdStatelastStateprivate final UiElementViewGroup.EventListenereventListener
-
Constructor Summary
Constructors Constructor Description UiElementViewGroup(Context context)Constructs a new UiElementViewGroup instance.
-
Method Summary
Modifier and Type Method Description UiElementViewGroupManagergetUiElementViewManager()the manager of UiElementViews final VideoAdStategetLastState()the last state of video ad. final UiElementViewGroup.EventListenergetEventListener()the event listener to which vast events must be sent. Unitupdate(VideoAdState state, VideoProgressUpdate progressUpdate, Boolean muted)Propagates state and progressUpdate to the UiElementViews managed by UiElementViewGroupManager. UnitaddView(View child, Integer index, ViewGroup.LayoutParams params)Adds given child view with the specified params. UnitremoveView(View view)UnitremoveAllViews()abstract UnitinternalUpdate(VideoAdState state, VideoProgressUpdate adProgress, Boolean muted)Propagates state and adProgress to the UiElementViews managed by UiElementViewGroupManager internally. UnitsetEventListener(UiElementViewGroup.EventListener eventListener)Specified the event listener to which vast events must be sent. -
-
Constructor Detail
-
UiElementViewGroup
UiElementViewGroup(Context context)
Constructs a new UiElementViewGroup instance.- Parameters:
context- the context.
-
-
Method Detail
-
getUiElementViewManager
UiElementViewGroupManager getUiElementViewManager()
the manager of UiElementViews
-
getLastState
final VideoAdState getLastState()
the last state of video ad.
-
getEventListener
final UiElementViewGroup.EventListener getEventListener()
the event listener to which vast events must be sent.
-
update
Unit update(VideoAdState state, VideoProgressUpdate progressUpdate, Boolean muted)
Propagates state and progressUpdate to the UiElementViews managed by UiElementViewGroupManager.
- Parameters:
state- the current state of video ad.progressUpdate- the VideoProgressUpdate describing playback progress of the current ad.muted- the mute state of the current audio stream.
-
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
abstract 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.
-
setEventListener
@CallSuper() Unit setEventListener(UiElementViewGroup.EventListener eventListener)
Specified the event listener to which vast events must be sent.
- Parameters:
eventListener- the event listener.
-
-
-
-