Search code examples
androidandroid-youtube-apiandroid-actionbar-compat

Is there a way to implement actionbar to the activity that extends youtubebaseactivity


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?


Solution

  • 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.