9
- What is the difference of
AppCompatActivity
forActivity
? - From which version to
AppCompatActivity
was added to theAndroid
?
9
AppCompatActivity
for Activity
? AppCompatActivity
was added to the Android
?10
The difference is that the Appcompactactivity allows, using the support library, use the Actionbar(entered into the API level 11) in applications from the API level 7.
After revision 22.1 a support library also includes support for material color Palette, tinting widget and Toolbar.
From revision 24.2 to class Actionbaractivity, which hitherto served that purpose, was considered obsolete.
So that the applications that use the above facilities can run in the API level 7 or higher, you will need to make your Activities inherit from Appcompactactivity.
Regarding which version the class was added I think it has existed since the support library(v4) was introduced in March 2011. However, it was with its update in revision 22.1(April 2015) that it became the base class for Activities use Actionbar in "compatibility mode".
Browser other questions tagged android android-activity
You are not signed in. Login or sign up in order to post.