use of com.google.android.libraries.cast.companionlibrary.cast.BaseCastManager in project Shuttle by timusus.
the class BaseFragment method setupCastMenu.
protected void setupCastMenu(Menu menu) {
if (getActivity() instanceof BaseCastActivity) {
BaseCastManager castManager = ((BaseCastActivity) getActivity()).castManager;
castManager.addMediaRouterButton(menu, R.id.media_route_menu_item);
MenuItem mediaRouteMenuItem = menu.findItem(R.id.media_route_menu_item);
((CustomMediaRouteActionProvider) MenuItemCompat.getActionProvider(mediaRouteMenuItem)).setActivity(getActivity());
}
}
Aggregations