Reputation: 2398
Action Bar was added to Android in API 11. In my applications when I implement action bar, I am made to higher my min. SDK version to API 11. But, what I see in daily practice is, action bar in applications running on Android 2.3 phones. How does this happen ? How can I implement action bar in my applications without ascending my min. SDK version to API 11 ?
Upvotes: 0
Views: 70
Reputation: 21
Generally, if you want to have backward compatibility you need to work with support library. Many things introduced in newer versions of android is made to be able to implement in older versions of android through this support library. You can visit android developer website(http://developer.android.com/tools/support-library/index.html) for further reading.
Upvotes: 2
Reputation: 25
Go to Android SDK Manager
and download android support library from extras
Upvotes: 0
Reputation: 1446
Now no need to add ActionBarSherlock.You can add Android support library(v7) & extend your activity as, public YourActivity extends ActionBarActivity { ... } And, from onCreate() of this Activity, you can get the ActionBar by calling getSupportActionBar(). If you include V7 support library, you can find the ActionBarActivity under the package 'android.support.v7.app'
Upvotes: 2