0
public class MainActivity extends ActionBarActivity

public class MainActivity extends Activity

Earlier, while I was using the eclipse IDE, the first Java file generated had a Class that inherits from Activity. However, In android studio , it is ActionBarActivity, and how does both of these differ? why does it inherit from ActionBarActivity rather than Activity?

1 Answers1

0

When you use ActionBarActivity it uses the android Support Library which means you have more coverage on older devices i.e devices api level 7 and up.

Have a read here where it is explained in a bit more detail.

https://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html

Andy Joyce
  • 2,802
  • 3
  • 15
  • 24