What Is Difference Between Activity and Appcompatactivity in Android?
Contents

AppCompatActivity is a class from e v7 appcompat library. This is a compatibility library that back ports some features of recent versions of Android to older devices. … If you use support library ,you have to have all your activities extend AppCompatActivity instead of the Activity base class.

What is the difference between AppCompatActivity and activity?

The differences between them are: Activity is the basic one. Based on Activity , FragmentActivity provides the ability to use Fragment . Based on FragmentActivity , AppCompatActivity provides features to ActionBar .

What is the AppCompatActivity?

androidx.appcompat.app.AppCompatActivity. Base class for activities that wish to use some of the newer platform features on older Android devices. Some of these backported features include: Using the action bar, including action items, navigation modes and more with the setSupportActionBar(Toolbar) API.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest