本文整理汇总了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());
}
}
示例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());
}
示例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);
}
示例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);
}