diff options
author | Domingos Lopes <domingos86lopes+github@gmail.com> | 2016-06-28 02:07:43 -0400 |
---|---|---|
committer | Domingos Lopes <domingos86lopes+github@gmail.com> | 2016-06-28 02:18:11 -0400 |
commit | 6d0debfd4d0c19ebe0287b136072b05ae6d8e65f (patch) | |
tree | 5537d380200a1980484c517a28af46d2ab39581c /app/src/play/java/de/danoeh/antennapod/config | |
parent | 926f3912cfc774ebf89db9d668ec3d31c6634f70 (diff) | |
download | AntennaPod-6d0debfd4d0c19ebe0287b136072b05ae6d8e65f.zip |
implement custom mediaroute playback controller
Diffstat (limited to 'app/src/play/java/de/danoeh/antennapod/config')
-rw-r--r-- | app/src/play/java/de/danoeh/antennapod/config/CastCallbackImpl.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/app/src/play/java/de/danoeh/antennapod/config/CastCallbackImpl.java b/app/src/play/java/de/danoeh/antennapod/config/CastCallbackImpl.java new file mode 100644 index 000000000..ca3758351 --- /dev/null +++ b/app/src/play/java/de/danoeh/antennapod/config/CastCallbackImpl.java @@ -0,0 +1,29 @@ +package de.danoeh.antennapod.config; + +import android.content.Context; +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.v7.app.MediaRouteControllerDialog; +import android.support.v7.app.MediaRouteControllerDialogFragment; +import android.support.v7.app.MediaRouteDialogFactory; + +import de.danoeh.antennapod.cast.CustomMRControllerDialog; +import de.danoeh.antennapod.core.CastCallbacks; + +public class CastCallbackImpl implements CastCallbacks { + @Override + public MediaRouteDialogFactory getMediaRouterDialogFactory() { + return new MediaRouteDialogFactory() { + @NonNull + @Override + public MediaRouteControllerDialogFragment onCreateControllerDialogFragment() { + return new MediaRouteControllerDialogFragment() { + @Override + public MediaRouteControllerDialog onCreateControllerDialog(Context context, Bundle savedInstanceState) { + return new CustomMRControllerDialog(context); + } + }; + } + }; + } +} |