有没有一种方法可以对扩展youtubebaseactivity的活动实施操作栏 [英] Is there a way to implement actionbar to the activity that extends youtubebaseactivity

查看:89
本文介绍了有没有一种方法可以对扩展youtubebaseactivity的活动实施操作栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一项扩展youtubebaseActivity的活动,用于播放youtube视频.我想在此活动中有一个动作栏.有办法实现吗?

I have an activity that extends youtubebaseActivity for playing youtube videos. i would like to have an actionbar in this activity. Is there a way to implement it?

推荐答案

YouTubePlayerFragment is designed so you can play YouTube videos and use any Activity class (such as AppCompatActivity):

使用此片段是播放YouTube视频的首选方式,因为您的活动无需像直接使用YouTubePlayerView那样扩展库提供的活动.

Using this fragment is the preferred way of playing YouTube videos because your activity does not need to extend an activity provided by the library, as is the case with using the YouTubePlayerView directly.

还有 YouTubePlayerSupportFragment 如果您使用支持片段.

There's also YouTubePlayerSupportFragment if you use Support Fragments.

这篇关于有没有一种方法可以对扩展youtubebaseactivity的活动实施操作栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆