问题
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?
回答1:
YouTubePlayerFragment is designed so you can play YouTube videos and use any Activity class (such as AppCompatActivity
):
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.
There's also YouTubePlayerSupportFragment if you use Support Fragments.
来源:https://stackoverflow.com/questions/24817266/is-there-a-way-to-implement-actionbar-to-the-activity-that-extends-youtubebaseac