title: How to use getSupportActionBar in FragmentActivity?
body: <p>It says that <code>ActionBarActivity</code> is a subclass of <code>FragmentActivity</code>, but in my FragmentActivity I can't use <code>getSupportActionBar()</code>.<br>
  It works well when it extends ActionBarActivity, but I need exactly FragmentActivity for other stuff. I tried to use ActionBar v7, but it gives me NullPointerException also tried other things written here like:</p>
  
  <pre><code> ActionBar actionBar = ((ActionBarActivity)getActivity()).getSupportActionBar;
  </code></pre>
  
  <p>but none of them worked.</p>
  
  <pre><code>package com.example.campusinfo;
  
  import android.graphics.Typeface;
  import android.graphics.drawable.ColorDrawable;
  import android.os.Bundle;
  import android.support.v4.app.FragmentActivity;
  import android.support.v7.app.ActionBar;
  import android.support.v7.app.ActionBarActivity;
  import android.widget.TextView;
  
  public class ActivityTab extends FragmentActivity{
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_tab);
  
          getSupportActionBar().setBackgroundDrawable(new ColorDrawable(0xff1699d1));
          getSupportActionBar().setDisplayShowTitleEnabled(false);
          getSupportActionBar().setCustomView(R.layout.title_activity);
          getSupportActionBar().setDisplayShowCustomEnabled(true);
  
          TextView tv = (TextView) findViewById(R.id.activity_title);
          tv.setTextSize(35f);
          Typeface face = Typeface.createFromAsset(getAssets(), "fonts/capriola.ttf");
          tv.setTypeface(face);
      }
  
  }
  </code></pre>