Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 657
Booyaches Avatar asked Oct 09 '14 09:10

Booyaches


1 Answers

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.

like image 52
marcinj Avatar answered Sep 30 '22 01:09

marcinj