In Android What is the main difference between extending a class from AppCompatActivity and ActionBarActivity? How do these classes differ?
Asked
Active
Viewed 1.6k times
2
N J
- 27,217
- 13
- 76
- 96
2 Answers
6
ActionBarActivity is now deprecated. As of version 22.1 of the support library you should use AppCompatActivity.
Chris Banes (one of the authors of the AppCompat library) covered the refactor in detail here.
Ben Pearson
- 7,532
- 4
- 30
- 50
-
can you tell me the main difference? – N J May 06 '15 at 17:45
-
Updated the answer with a link that explains it in detail – Ben Pearson May 06 '15 at 17:48
0
ActionBarActivity is deprecated, you must use AppCompatActivity instead
KM11
- 697
- 6
- 15
-
-
Found similar question asked before, [accepted answer](http://stackoverflow.com/a/29978777/2846982) – KM11 May 06 '15 at 17:47
-
It has been deprecated but it can still be used, so it is not a "must" ! It is more preferably to use AppCompatActivity but not mandatory. – Red M Oct 07 '16 at 16:57