Class TrackSelectionView

    • Constructor Detail

      • TrackSelectionView

        public TrackSelectionView​(Context context)
        Creates a track selection view.
      • TrackSelectionView

        public TrackSelectionView​(Context context,
                                  @Nullable
                                  AttributeSet attrs)
        Creates a track selection view.
      • TrackSelectionView

        public TrackSelectionView​(Context context,
                                  @Nullable
                                  AttributeSet attrs,
                                  @AttrRes
                                  int defStyleAttr)
        Creates a track selection view.
    • Method Detail

      • setAllowAdaptiveSelections

        public void setAllowAdaptiveSelections​(boolean allowAdaptiveSelections)
        Sets whether adaptive selections (consisting of more than one track) can be made using this selection view.

        For the view to enable adaptive selection it is necessary both for this feature to be enabled, and for the target renderer to support adaptation between the available tracks.

        Parameters:
        allowAdaptiveSelections - Whether adaptive selection is enabled.
      • setAllowMultipleOverrides

        public void setAllowMultipleOverrides​(boolean allowMultipleOverrides)
        Sets whether tracks from multiple track groups can be selected. This results in multiple SelectionOverrides to be returned by getOverrides().
        Parameters:
        allowMultipleOverrides - Whether multiple track selection overrides can be selected.
      • setShowDisableOption

        public void setShowDisableOption​(boolean showDisableOption)
        Sets whether an option is available for disabling the renderer.
        Parameters:
        showDisableOption - Whether the disable option is shown.
      • setTrackNameProvider

        public void setTrackNameProvider​(TrackNameProvider trackNameProvider)
        Sets the TrackNameProvider used to generate the user visible name of each track and updates the view with track names queried from the specified provider.
        Parameters:
        trackNameProvider - The TrackNameProvider to use.
      • getIsDisabled

        public boolean getIsDisabled()
        Returns whether the renderer is disabled.