docs/doc/reference/com/google/android/exoplayer2/ui/TrackSelectionDialogBuilder.html
Package com.google.android.exoplayer2.ui
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classTrackSelectionDialogBuilderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Builder for a dialog with a TrackSelectionView.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | TrackSelectionDialogBuilder.DialogCallback |
Deprecated.
Callback which is invoked when a track selection has been made. |
Constructors | Constructor | Description |
| --- | --- |
| TrackSelectionDialogBuilder(Context context, CharSequence title, Player player, @com.google.android.exoplayer2.C.TrackType int trackType) |
Deprecated.
Creates a builder for a track selection dialog.
|
| TrackSelectionDialogBuilder(Context context, CharSequence title, List<Tracks.Group> trackGroups, TrackSelectionDialogBuilder.DialogCallback callback) |
Deprecated.
Creates a builder for a track selection dialog. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| Dialog | build() |
Deprecated.
Builds the dialog.
|
| TrackSelectionDialogBuilder | setAllowAdaptiveSelections(boolean allowAdaptiveSelections) |
Deprecated.
Sets whether adaptive selections (consisting of more than one track) can be made.
|
| TrackSelectionDialogBuilder | setAllowMultipleOverrides(boolean allowMultipleOverrides) |
Deprecated.
Sets whether multiple overrides can be set and selected, i.e.
|
| TrackSelectionDialogBuilder | setIsDisabled(boolean isDisabled) |
Deprecated.
Sets whether the selection is initially shown as disabled.
|
| TrackSelectionDialogBuilder | setOverride(TrackSelectionOverride override) |
Deprecated.
Sets the single initial override.
|
| TrackSelectionDialogBuilder | setOverrides(Map<TrackGroup,TrackSelectionOverride> overrides) |
Deprecated.
Sets the initial track overrides.
|
| TrackSelectionDialogBuilder | setShowDisableOption(boolean showDisableOption) |
Deprecated.
Sets whether an option is available for disabling the renderer.
|
| TrackSelectionDialogBuilder | setTheme(int themeResId) |
Deprecated.
Sets the resource ID of the theme used to inflate this dialog.
|
| void | setTrackFormatComparator(Comparator<Format> trackFormatComparator) |
Deprecated.
Sets a Comparator used to determine the display order of the tracks within each track group.
|
| TrackSelectionDialogBuilder | setTrackNameProvider(TrackNameProvider trackNameProvider) |
Deprecated.
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.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public TrackSelectionDialogBuilder([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,[CharSequence](https://developer.android.com/reference/java/lang/CharSequence.html "class or interface in java.lang")title,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Tracks.Group](../Tracks.Group.html "class in com.google.android.exoplayer2")> trackGroups,[TrackSelectionDialogBuilder.DialogCallback](TrackSelectionDialogBuilder.DialogCallback.html "interface in com.google.android.exoplayer2.ui")callback)
Deprecated.
Creates a builder for a track selection dialog.
Parameters:context - The context of the dialog.title - The title of the dialog.trackGroups - The track groups.callback - The TrackSelectionDialogBuilder.DialogCallback invoked when a track selection has been made.
-
public TrackSelectionDialogBuilder([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,[CharSequence](https://developer.android.com/reference/java/lang/CharSequence.html "class or interface in java.lang")title,[Player](../Player.html "interface in com.google.android.exoplayer2")player,
@com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.
Creates a builder for a track selection dialog.
Parameters:context - The context of the dialog.title - The title of the dialog.player - The Player whose tracks should be selected.trackType - The type of tracks to show for selection.
-
public[TrackSelectionDialogBuilder](TrackSelectionDialogBuilder.html "class in com.google.android.exoplayer2.ui")setTheme(@StyleRes
int themeResId)
Deprecated.
Sets the resource ID of the theme used to inflate this dialog.
Parameters:themeResId - The resource ID of the theme.Returns:This builder, for convenience.
-
public[TrackSelectionDialogBuilder](TrackSelectionDialogBuilder.html "class in com.google.android.exoplayer2.ui")setIsDisabled(boolean isDisabled)
Deprecated.
Sets whether the selection is initially shown as disabled.
Parameters:isDisabled - Whether the selection is initially shown as disabled.Returns:This builder, for convenience.
-
public[TrackSelectionDialogBuilder](TrackSelectionDialogBuilder.html "class in com.google.android.exoplayer2.ui")setOverride(@Nullable[TrackSelectionOverride](../trackselection/TrackSelectionOverride.html "class in com.google.android.exoplayer2.trackselection")override)
Deprecated.
Sets the single initial override.
Parameters:override - The initial override, or null for no override.Returns:This builder, for convenience.
-
public[TrackSelectionDialogBuilder](TrackSelectionDialogBuilder.html "class in com.google.android.exoplayer2.ui")setOverrides([Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[TrackGroup](../source/TrackGroup.html "class in com.google.android.exoplayer2.source"),[TrackSelectionOverride](../trackselection/TrackSelectionOverride.html "class in com.google.android.exoplayer2.trackselection")> overrides)
Deprecated.
Sets the initial track overrides. Any overrides that do not correspond to track groups that were passed to the constructor will be ignored. If setAllowMultipleOverrides(boolean) hasn't been set to true then all but one override will be ignored. The retained override will be the one whose track group was first in the list of track groups passed to the constructor.
Parameters:overrides - The initially selected track overrides.Returns:This builder, for convenience.
-
public[TrackSelectionDialogBuilder](TrackSelectionDialogBuilder.html "class in com.google.android.exoplayer2.ui")setAllowAdaptiveSelections(boolean allowAdaptiveSelections)
Deprecated.
Sets whether adaptive selections (consisting of more than one track) can be made.
For the selection 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.Returns:This builder, for convenience.
-
public[TrackSelectionDialogBuilder](TrackSelectionDialogBuilder.html "class in com.google.android.exoplayer2.ui")setAllowMultipleOverrides(boolean allowMultipleOverrides)
Deprecated.
Sets whether multiple overrides can be set and selected, i.e. tracks from multiple track groups can be selected.
Parameters:allowMultipleOverrides - Whether multiple track selection overrides are allowed.Returns:This builder, for convenience.
-
public[TrackSelectionDialogBuilder](TrackSelectionDialogBuilder.html "class in com.google.android.exoplayer2.ui")setShowDisableOption(boolean showDisableOption)
Deprecated.
Sets whether an option is available for disabling the renderer.
Parameters:showDisableOption - Whether the disable option is shown.Returns:This builder, for convenience.
-
public void setTrackFormatComparator(@Nullable[Comparator](https://developer.android.com/reference/java/util/Comparator.html "class or interface in java.util")<[Format](../Format.html "class in com.google.android.exoplayer2")> trackFormatComparator)
Deprecated.
Sets a Comparator used to determine the display order of the tracks within each track group.
Parameters:trackFormatComparator - The comparator, or null to use the original order.
-
public[TrackSelectionDialogBuilder](TrackSelectionDialogBuilder.html "class in com.google.android.exoplayer2.ui")setTrackNameProvider(@Nullable[TrackNameProvider](TrackNameProvider.html "interface in com.google.android.exoplayer2.ui")trackNameProvider)
Deprecated.
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, or null to use the default.
-
public[Dialog](https://developer.android.com/reference/android/app/Dialog.html "class or interface in android.app")build()
Deprecated.
Builds the dialog.