Moayad Hani Abu Rmilah
Moayad Hani Abu Rmilah

Reputation: 830

How to add action bar to my main activity from another class that extends ActionBarActivity?

My problem comes from the fact that Java cannot extend two different activities. I have my main activity extending FragmentActivity. I want to add ActionBar with the support to old Android versions. Hence, extending ActionBarActivity is needed. How can I use another class which extends ActionBarActivity to add the action bar in my main activity?

Upvotes: 1

Views: 659

Answers (1)

Alexander
Alexander

Reputation: 48242

Make your main activity extend ActionBarActivity

ActionBar activity itself extends FragmentActivity so you should be fine.

Upvotes: 4

Related Questions