简体   繁体   中英

ActionbarSherlock and android:targetSdkVersion>13

I am using ActionbarSherlock 4.0 - the problem is that when I set targetSdkVersion to 14 or 15 the Home button stops working - everything is fine as soon as I set it back to 13 I am testing on a tablet with 3.1 and a phone with 2.3.6

If you mean the "up" button in the ActionBar, you have to call ActionBar.setDisplayHomeAsUpEnabled(true) when targeting API14+.

I found out what was wrong - one has to explicitly call when targetting 13+

getSupportActionBar().setHomeButtonEnabled(true);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM