Question

I am noob in Android. I just started to use ActionBarActivity over FragmentActivity. Is there any difference between them ??

Was it helpful?

Solution

FragmentActivity is the base class for support based fragments. So you will be using Fragment from support library below api level 11 in which case your Activity needs to extend FragmentActivity.

 ↳  android.support.v4.app.FragmentActivity
                       ↳    android.support.v7.app.ActionBarActivity

You will use ActionBarActivity when you need actionbar below API level 11 by using AppCompat library. In this case your Activity extends ActionBarActivity.

As you see ActionBarActivity extends FragmentActivity

OTHER TIPS

ActionBarActivity extends FragmentActivity and adds support for the appcompat action bar backport.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top