Is there a way to make a custom chromecast selector dialog? I have been looking through the documentation and can't find anything on how to do this.
You can do that:
MyChooserDialogFragment
. Next, extend the MediaRouteDialogFactory
(call that, say, MyMediaRouteDialogFactory) and override the method onCreateChooserDialogFragment()
. In there, you need to return an instance of MyChooserDialogFragment
:
public MediaRouteChooserDialogFragment onCreateChooserDialogFragment() {
return new MyChooserDialogFragment();
}
Finally, set this factory on the action provider:
mediaRouteActionProvider.setDialogFactory(new MyMediaRouteDialogFactory());