-1

While designing an android application - I have extended Activity Parent class in MainActivity.

While doing so I was not able to display string (App Name) in heading of application and image is not showing while testing on Android device.

But after changing Activity to AppCompatActivity - all of the errors get corrected.

I want to know why this happened?

Suman Dhital
  • 19
  • 1
  • 1
  • 6
    Possible duplicate of [Activity, AppCompatActivity, FragmentActivity, and ActionBarActivity: When to Use Which?](https://stackoverflow.com/questions/31297246/activity-appcompatactivity-fragmentactivity-and-actionbaractivity-when-to-us) – Tim Jul 19 '17 at 16:29

1 Answers1

0

AppCompact is used in order to support modern features for old devices. Such as UI, fragments, title bars, new menu and so on.

Activity is used for common usage.

Vyacheslav
  • 26,359
  • 19
  • 112
  • 194