I am following an Android lesson and under the Support Android 2.1 and Above section it is said my Activity
should extend the ActionBarActivity
class to support Action Bar on API-7 onwards.
However, documentation also says that this class is deprecated and I should use AppCompatActivity
instead. I'm confused here, which one should I use and why?
Yes. You should use AppCompatActivity
.
The AppCompatActivity
is a very new class and the training section on the android website is outdated.
Everything that you would do with ActionBarActivity
will work mostly the same on AppCompatActivity
.
For differences please read the post about it http://android-developers.blogspot.de/2015/04/android-support-library-221.html
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