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
?
Make your main activity extend ActionBarActivity
ActionBar activity itself extends FragmentActivity so you should be fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.