简体   繁体   中英

Android Contextual Action Bar API 8+

I want to use Contextual Action Bar in my app which supports API 8+ for multiple selection in the ListView .
I have read that Contextual Action Bar is supported on API 11+ and for older devices I should provide older Floating Context Menu .

Anyway I'm wondering if there isn't a newer solution, for example some supportlibrary v7 update supporting CAB or so.

I'm not using ActionBarSherlock and I don't want to...

The ActionBarActivity from the v7 support library supports the Contextual Action Bar via the same APIs as the API 11+ Activity class. The only difference is that the support methods all have "support" in them and you need to use the android.support.v7.view.ActionMode.Callback class for callbacks instead of the non-support version.

This has been a part of the v7 support library since the ActionBar classes were added to support the Action Bar in reversion 18, released in July of 2013.

See:

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