当前位置: 首页>>代码示例>>Java>>正文


Java LocalPlayerActivity类代码示例

本文整理汇总了Java中com.google.sample.cast.refplayer.mediaplayer.LocalPlayerActivity的典型用法代码示例。如果您正苦于以下问题:Java LocalPlayerActivity类的具体用法?Java LocalPlayerActivity怎么用?Java LocalPlayerActivity使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LocalPlayerActivity类属于com.google.sample.cast.refplayer.mediaplayer包,在下文中一共展示了LocalPlayerActivity类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: itemClicked

import com.google.sample.cast.refplayer.mediaplayer.LocalPlayerActivity; //导入依赖的package包/类
@Override
public void itemClicked(View view, MediaInfo item, int position) {
    if (view instanceof ImageButton) {
        Utils.showQueuePopup(getActivity(), view, item);
    } else {
        String transitionName = getString(R.string.transition_image);
        VideoListAdapter.ViewHolder viewHolder =
                (VideoListAdapter.ViewHolder) mRecyclerView.findViewHolderForPosition(position);
        Pair<View, String> imagePair = Pair
                .create((View) viewHolder.getImageView(), transitionName);
        ActivityOptionsCompat options = ActivityOptionsCompat
                .makeSceneTransitionAnimation(getActivity(), imagePair);

        Intent intent = new Intent(getActivity(), LocalPlayerActivity.class);
        intent.putExtra("media", item);
        intent.putExtra("shouldStart", false);
        ActivityCompat.startActivity(getActivity(), intent, options.toBundle());
    }
}
 
开发者ID:googlecast,项目名称:CastVideos-android,代码行数:20,代码来源:VideoBrowserFragment.java

示例2: itemClicked

import com.google.sample.cast.refplayer.mediaplayer.LocalPlayerActivity; //导入依赖的package包/类
@Override
public void itemClicked(View view, MediaItem item, int position) {
    String transitionName = getString(R.string.transition_image);
    VideoListAdapter.ViewHolder viewHolder =
            (VideoListAdapter.ViewHolder) mRecyclerView.findViewHolderForPosition(position);
    Pair<View, String> imagePair = Pair
            .create((View) viewHolder.getImageView(), transitionName);
    ActivityOptionsCompat options = ActivityOptionsCompat
            .makeSceneTransitionAnimation(getActivity(), imagePair);

    Intent intent = new Intent(getActivity(), LocalPlayerActivity.class);
    intent.putExtra("media", item.toBundle());
    intent.putExtra("shouldStart", false);
    ActivityCompat.startActivity(getActivity(), intent, options.toBundle());
}
 
开发者ID:googlecodelabs,项目名称:cast-videos-android,代码行数:16,代码来源:VideoBrowserFragment.java

示例3: handleNavigation

import com.google.sample.cast.refplayer.mediaplayer.LocalPlayerActivity; //导入依赖的package包/类
private void handleNavigation(MediaItem info, boolean autoStart) {
    Intent intent = new Intent(getActivity(), LocalPlayerActivity.class);
    intent.putExtra("media", info.toBundle());
    intent.putExtra("shouldStart", autoStart);
    getActivity().startActivity(intent);
}
 
开发者ID:BruGTUG,项目名称:codelab-chromecast,代码行数:7,代码来源:VideoBrowserListFragment.java

示例4: handleNavigation

import com.google.sample.cast.refplayer.mediaplayer.LocalPlayerActivity; //导入依赖的package包/类
private void handleNavigation(MediaInfo info, boolean autoStart) {
    Intent intent = new Intent(getActivity(), LocalPlayerActivity.class);
    intent.putExtra("media", Utils.fromMediaInfo(info));
    intent.putExtra("shouldStart", autoStart);
    getActivity().startActivity(intent);
}
 
开发者ID:BruGTUG,项目名称:codelab-chromecast,代码行数:7,代码来源:VideoBrowserListFragment.java


注:本文中的com.google.sample.cast.refplayer.mediaplayer.LocalPlayerActivity类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。