I'm using fragments on my activity and also I need actionbar too. for having actionbar on android 2.2+, I need to extend actionbar activity and I need to extends FragmentActivity too.
Java doesn't let us to extend two classes.
What is the solution? How can I do so?
If you check source of ActionBarActivity
you will see that ActionBarActivity
extends FragmentActivity
. So you only need to extend ActionBarActivity.
You can link to the develop website: https://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html
As you look, class ActionBarActivity
extends FragmentActivity
,So you just need to extends ActionBarActivity
.
java.lang.Object
↳ android.content.Context
↳ android.content.ContextWrapper
↳ android.view.ContextThemeWrapper
↳ android.app.Activity
↳ android.support.v4.app.FragmentActivity
↳ android.support.v7.app.ActionBarActivity
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With