Search code examples
javaandroidandroid-actionbarandroid-youtube-api

Activity extending ActionBarActivity and YouTubeBaseActivity


In my application I need to getSupportActionBar() in order to change its title and enable home as back button. I also need to have a YouTubePlayerView to display a video. I cannot extend ActionBarActivity and YouTubeBaseActivity in the same time. What is the proper way to solve such problem?


Solution

  • You should use YouTubePlayerFragment instead of YouTubeBaseActivity. You will be able to extend your activity from ActionBarActivity which will allow to use both getSupportActionBar() and fragments.