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 Details

    • onComponentViewsChanged

      void onComponentViewsChanged(@NonNull PlayerController playerController)
      Called whenever the list of ComponentViews in the PlayerController 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

      @Nullable Collection<Pair<Integer,View>> scanComponentViews(@NonNull ViewGroup container)
      Implementors should scan for the "desired" Views. The Views could be at any hierarchy level, so the use of View.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