Reputation: 58732
ActionBar#setHomeButtonEnabled(true) is defined for api level > 14.
The doc say, "This defaults to true for packages targeting < API 14
".
How can I disable the Home button for earlier versions. Currently if I press the home button in action bar, the screen refreshes.
I like to support Version 13, so my config is.
android:minSdkVersion="13"
android:targetSdkVersion="15"/>
Upvotes: 1
Views: 287
Reputation: 14941
I would suggest using the popular open source library ActionBarSherlock. It supports an ActionBar using the ActionBar API from ICS (API level 14), but backports all the way back to API Level 7 (aka 2.1).
This will let you use setHomeButtonEnabled() and the rest of the ActionBar API from API Level 7 to the latest, which is currently API Level 16.
Upvotes: 1