Reputation: 51
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!!!!
Upvotes: 5
Views: 4913
Reputation: 10342
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.
Upvotes: 16