Posts

Showing posts with the label What's the difference between AppCompatActivity and normal Activity? And what should I use?

2: AppCompatActivity and normal activity

What's the difference between AppCompatActivity and normal Activity? And what should I use? AppCompatActivity  is one of the main classes in the  Android Support Library . With every release of Android, new features are added, so the Android team works on supporting those new features for older devices. To solve this issue, they introduced the Android Support Library that can deliver latest features to older devices (as old as API v7). That is, they backport those new features and allow them to be present on older devices. In this library, the default base class used for activities is  AppCompatActivity  instead of the normal Activity class. Some of those features include Material Design widgets and support action bars, etc. Therefore, to get most out of the Android Support Library (that is, to get the latest features supported across the highest number of devices),  you must use AppCompatActivity instead of the normal Activity class .