Java 类android.app.MediaRouteActionProvider 实例源码

项目:ApkLauncher    文件:PresentationWithMediaRouterActivity.java   
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Be sure to call the super class.
    super.onCreateOptionsMenu(menu);

    // Inflate the menu and configure the media router action provider.
    getMenuInflater().inflate(R.menu.presentation_with_media_router_menu, menu);

    MenuItem mediaRouteMenuItem = menu.findItem(R.id.menu_media_route);
    MediaRouteActionProvider mediaRouteActionProvider =
            (MediaRouteActionProvider)mediaRouteMenuItem.getActionProvider();
    mediaRouteActionProvider.setRouteTypes(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);

    // Return true to show the menu.
    return true;
}
项目:ApiDemos    文件:PresentationWithMediaRouterActivity.java   
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Be sure to call the super class.
    super.onCreateOptionsMenu(menu);

    // Inflate the menu and configure the media router action provider.
    getMenuInflater().inflate(R.menu.presentation_with_media_router_menu, menu);

    MenuItem mediaRouteMenuItem = menu.findItem(R.id.menu_media_route);
    MediaRouteActionProvider mediaRouteActionProvider =
            (MediaRouteActionProvider)mediaRouteMenuItem.getActionProvider();
    mediaRouteActionProvider.setRouteTypes(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);

    // Return true to show the menu.
    return true;
}
项目:CastPresentation-android    文件:PresentationWithMediaRouterActivity.java   
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Be sure to call the super class.
    super.onCreateOptionsMenu(menu);

    // Inflate the menu and configure the media router action provider.
    getMenuInflater().inflate(R.menu.presentation_with_media_router_menu, menu);

    MenuItem mediaRouteMenuItem = menu.findItem(R.id.menu_media_route);
    MediaRouteActionProvider mediaRouteActionProvider =
            (MediaRouteActionProvider) mediaRouteMenuItem.getActionProvider();
    mediaRouteActionProvider.setRouteTypes(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);

    // Return true to show the menu.
    return true;
}
项目:felix-on-android    文件:PresentationWithMediaRouterActivity.java   
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Be sure to call the super class.
    super.onCreateOptionsMenu(menu);

    // Inflate the menu and configure the media router action provider.
    getMenuInflater().inflate(R.menu.presentation_with_media_router_menu, menu);

    MenuItem mediaRouteMenuItem = menu.findItem(R.id.menu_media_route);
    MediaRouteActionProvider mediaRouteActionProvider =
            (MediaRouteActionProvider)mediaRouteMenuItem.getActionProvider();
    mediaRouteActionProvider.setRouteTypes(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);

    // Return true to show the menu.
    return true;
}
项目:MEng    文件:PresentationWithMediaRouterActivity.java   
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Be sure to call the super class.
    super.onCreateOptionsMenu(menu);

    // Inflate the menu and configure the media router action provider.
    getMenuInflater().inflate(R.menu.presentation_with_media_router_menu, menu);

    MenuItem mediaRouteMenuItem = menu.findItem(R.id.menu_media_route);
    MediaRouteActionProvider mediaRouteActionProvider =
            (MediaRouteActionProvider)mediaRouteMenuItem.getActionProvider();
    mediaRouteActionProvider.setRouteTypes(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);

    // Return true to show the menu.
    return true;
}
项目:deview-2013-samples    文件:PresentationWithMediaRouterActivity.java   
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Be sure to call the super class.
    super.onCreateOptionsMenu(menu);

    // Inflate the menu and configure the media router action provider.
    getMenuInflater().inflate(R.menu.presentation_with_media_router_menu, menu);

    MenuItem mediaRouteMenuItem = menu.findItem(R.id.menu_media_route);
    MediaRouteActionProvider mediaRouteActionProvider =
            (MediaRouteActionProvider)mediaRouteMenuItem.getActionProvider();
    mediaRouteActionProvider.setRouteTypes(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);

    // Return true to show the menu.
    return true;
}