title: YoutubeplayerSupportFragment and actionBarActivity
body: <p>What i am trying to do is put the <code>Actionbar</code> with home upenabled in the <code>Activity</code> with the youtube playersupportfragment. I have the code in <code>Xml</code> as</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="${packageName}.${activityClass}" &gt;
  
      &lt;TextView
          android:id="@+id/tvVideoTitle"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:layout_marginBottom="5dip"
          android:padding="@dimen/activity_vertical_margin"
          android:text="Medium Text"
          android:textAppearance="?android:attr/textAppearanceMedium"
          android:textColor="@color/red_color" /&gt;
  
      &lt;fragment
          android:id="@+id/youtube_fragment"
          android:name="com.google.android.youtube.player.YouTubePlayerSupportFragment"
          android:layout_width="fill_parent"
          android:layout_height="240dip"
          android:layout_alignParentLeft="true"
          android:layout_below="@+id/tvVideoTitle" /&gt;
  
      &lt;TextView
          android:id="@+id/tvVideoDesc"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_below="@+id/youtube_fragment"
          android:padding="@dimen/activity_vertical_margin"
          android:text="Small Text"
          android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <hr>
  
  <p>the above video fragment plays the video jst fine when i have this code.</p>
  
  <hr>
  
  <pre><code>public class YoutubeVideoView extends ActionBarActivity implements YouTubePlayer.PlaybackEventListener, YouTubePlayer.OnInitializedListener, YouTubePlayer.OnFullscreenListener{
  
  private YouTubePlayerView youtuber;
  private TextView videoTitle, videoDesc;
  private YouTubePlayerSupportFragment youTubePlayerFragment;
  
  private int index;
  private ArrayList&lt;String&gt; titles, ids, details;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  //  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
      super.onCreate(savedInstanceState);
      setContentView(R.layout.youtube_video_view);
  youTubePlayerFragment = (YouTubePlayerSupportFragment)getSupportFragmentManager().
  findFragmentById(R.id.youtube_fragment);
      youTubePlayerFragment.initialize(developerKey, this);
  </code></pre>
  
  <hr>
  
  <p>now here the line <code>getSupportActionBar().setDisplayHomeAsUpEnabled(true)</code>; is commented but if i uncomment it shows the error. I'm posting the errror below</p>
  
  <hr>
  
  <pre><code>07-19 21:44:48.587: E/AndroidRuntime(1303): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.abc.def/com.abc.def.YoutubeVideoView}: java.lang.NullPointerException
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at android.app.ActivityThread.access$800(ActivityThread.java:135)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at android.os.Handler.dispatchMessage(Handler.java:102)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at android.os.Looper.loop(Looper.java:136)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at android.app.ActivityThread.main(ActivityThread.java:5017)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at java.lang.reflect.Method.invokeNative(Native Method)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at java.lang.reflect.Method.invoke(Method.java:515)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at dalvik.system.NativeStart.main(Native Method)
  07-19 21:44:48.587: E/AndroidRuntime(1303): Caused by: java.lang.NullPointerException
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at android.support.v7.app.ActionBarActivity.getSupportActionBar(ActionBarActivity.java:66)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at com.abc.def.YoutubeVideoView.onCreate(YoutubeVideoView.java:34)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at android.app.Activity.performCreate(Activity.java:5231)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
  07-19 21:44:48.587: E/AndroidRuntime(1303):     ... 11 more
  </code></pre>
  
  <hr>
  
  <p>I would appreciate any help. Thank you in advance.</p>