Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse creates extends ActionBarActivity instead activity

when I create a new android project Eclipse creates my MainActivity with extends ActionBarActivity instead activity. And want know how change this to when Eclipse creates my MainActivity extends activity.

thanks for you help!!!!

like image 422
Humberto Antonio Avatar asked Mar 06 '14 21:03

Humberto Antonio


1 Answers

Note: This answer is not valid anymore. At the time I answered this question, it was pre-material era and AppCompat library was necessary only if you want to target below API 11. Now to have Material Design, you almost have to use AppCompat library for all API levels. I think Android Studio always creates Activity that etends AppCompatActivity now.

And lastly do not use ActionBarActivity, use AppCompatActivity


If you set your minimum required SDK below 11 it will create the application like this because in API level below 11 there is no ActionBar. The default value is 8. You should set it 14 and then you can change it in your AndroidManifest.xml file.

like image 59
tasomaniac Avatar answered Sep 18 '22 14:09

tasomaniac