Package com.castlabs.android.player
Interface PlayerControllerPlugin.ComponentViewListener
- All Known Subinterfaces:
PlayerControllerPlugin.VisualComponent
- All Known Implementing Classes:
ExoSubtitlesRendererPlugin.ExoSubtitleComponent
,VisualComponentProxy
- Enclosing interface:
PlayerControllerPlugin
public static interface PlayerControllerPlugin.ComponentViewListener
Interface which allows
Components
to work with their Views.- Since:
- 4.2.2
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onComponentViewsChanged
(PlayerController playerController) Called whenever the list of ComponentViews in thePlayerController
has changed.scanComponentViews
(ViewGroup container) Implementors should scan for the "desired" Views.
-
Method Details
-
onComponentViewsChanged
Called whenever the list of ComponentViews in thePlayerController
has changed. This is whenever a View is added, or removed. Implementors should use this callback to detach from an old View (if any) and attach to the new one (if any). It is possible that there's actually no change affecting one particular ComponentViewListener. In this case the callback should just be ignored.- Parameters:
playerController
- the PlayerController firing this event.
-
scanComponentViews
Implementors should scan for the "desired" Views. The Views could be at any hierarchy level, so the use ofView.findViewById(int)
is encouraged. You *should not* hold a reference to the found Views.- Parameters:
container
- the ViewGroup where there specific Views should be looked for.- Returns:
- a Collection of the found Views in the container
-