avrono
avrono

Reputation: 1680

Using android.support.v7.app.ActionBar without extending ActionBarActivity

I am trying to use the support 7 action bar. However my main activity is already extending FragmentActivity. Is there anyway of using the ActionBar without extending ActionBarActivity ?

For example : without extending this class, one cannot do :

ActionBar actionBar = getSupportActionBar();

As described in http://developer.android.com/guide/topics/ui/actionbar.html

Update:

As pointed out ActionBarActivity Extends FragmentActivity

Upvotes: 1

Views: 3751

Answers (1)

azertiti
azertiti

Reputation: 3150

ActionBarActivity extends FragmentActivity so your app will work as it does now and additionally will have the support for actionbar. See class hierarchy here: http://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html

Upvotes: 3

Related Questions