简体   繁体   English

Android上下文操作栏API 8+

[英]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 . 我想在我的应用程序中使用Contextual Action Bar ,它支持API 8+以便在ListView进行多项选择。
I have read that Contextual Action Bar is supported on API 11+ and for older devices I should provide older Floating Context Menu . 我已经读过API 11+支持Contextual Action Bar ,对于旧设备我应该提供较旧的Floating Context Menu

Anyway I'm wondering if there isn't a newer solution, for example some supportlibrary v7 update supporting CAB or so. 无论如何,我想知道是否有更新的解决方案,例如支持CAB的一些supportlibrary v7更新等。

I'm not using ActionBarSherlock and I don't want to... 我没有使用ActionBarSherlock,我不想......

The ActionBarActivity from the v7 support library supports the Contextual Action Bar via the same APIs as the API 11+ Activity class. v7支持库中的ActionBarActivity通过与API 11+ Activity类相同的API支持Contextual Action Bar。 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. 唯一的区别是支持方法都有“支持”,你需要使用android.support.v7.view.ActionMode.Callback类进行回调而不是非支持版本。

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. 这是v7支持库的一部分,因为ActionBar类被添加以支持2013年7月发布的reversion 18中的Action Bar。

See: 看到:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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