MediaRouteDialogFactory
public class MediaRouteDialogFactory
The media route dialog factory is responsible for creating the media route chooser and controller dialogs as needed.
The application can customize the dialogs by providing a subclass of the dialog factory to the MediaRouteButton using the setDialogFactory method.
Summary
Public constructors |
|---|
|
Creates a default media route dialog factory. |
Public methods |
|
|---|---|
static @NonNull MediaRouteDialogFactory |
Gets the default factory instance. |
@NonNull MediaRouteChooserDialogFragment |
Called when the chooser dialog is being opened and it is time to create the fragment. |
@NonNull MediaRouteControllerDialogFragment |
Called when the controller dialog is being opened and it is time to create the fragment. |
Public constructors
MediaRouteDialogFactory
public MediaRouteDialogFactory()
Creates a default media route dialog factory.
Public methods
getDefault
public static @NonNull MediaRouteDialogFactory getDefault()
Gets the default factory instance.
| Returns | |
|---|---|
@NonNull MediaRouteDialogFactory |
The default media route dialog factory, never null. |
onCreateChooserDialogFragment
public @NonNull MediaRouteChooserDialogFragment onCreateChooserDialogFragment()
Called when the chooser dialog is being opened and it is time to create the fragment.
Subclasses may override this method to create a customized fragment.
| Returns | |
|---|---|
@NonNull MediaRouteChooserDialogFragment |
The media route chooser dialog fragment, must not be null. |
onCreateControllerDialogFragment
public @NonNull MediaRouteControllerDialogFragment onCreateControllerDialogFragment()
Called when the controller dialog is being opened and it is time to create the fragment.
Subclasses may override this method to create a customized fragment.
| Returns | |
|---|---|
@NonNull MediaRouteControllerDialogFragment |
The media route controller dialog fragment, must not be null. |