If you look carefully, you will see it.
public class ActionBarActivity extends FragmentActivity implements ActionBarDrawerToggle.DelegateProvider TaskStackBuilder.SupportParentable
Here you can read about FragmentActivity: http://developer.android.com/reference/android/support/v4/app/FragmentActivity.html
And the differences between Activity and FragmentActivity: The difference between Activity and FragmentActivity
In addition, there are several new themes for the actionBar style ... https://developer.android.com/training/basics/actionbar/styling.html
Actionbar is represented at API level 11. com.android.support:appcompat-v7:+ is a support library that allows you to have an ActionBar in your application for devices running Android 3.0 or lower. So, if you need an action bar below api level 11, your activity should expand ActionBarActivity.
If you target api level 11 or higher, you do not need to extend the ActionBarActivity and reference the AppCompat. You can simply extend the Activity and you will have actionabr by default.
The default project for Android Studio includes it automatically depending on and extends ActionbarActivity instead of Activity to use it.
vanste25 Apr 15 '14 at 4:55 a.m. 2014-04-15 16:55
source share