上下文操作栏的蜂窝 [英] Contextual Action Bar in Honeycomb

查看:160
本文介绍了上下文操作栏的蜂窝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我期待复制的操作栏执行从蜂巢的Gmail应用程序

I'm looking to copy the action bar implementation from the gmail app in Honeycomb

不幸的是,我不能张贴图片,因为我是新来的。

Unfortunately I can't post an image because I'm new here.

基本上,当你选择一个电子邮件或更多你的动作条动画与一个不同的动作吧: 1.Contextual按钮

Basically, when you select an email or more your action bar animates into a different action bar with: 1.Contextual buttons

2.A新的完成按钮会出现在主页图标。

2.A new "Done" button appears over the Home icon.

有没有人有任何想法如何做到这一点?

Does anyone have any idea how to do this?

推荐答案

调用<一href="http://developer.android.com/reference/android/view/View.html#startActionMode%28android.view.ActionMode.Callback%29"><$c$c>startActionMode方法可在任何视图或活动。此方法接受一个<一个href="http://developer.android.com/reference/android/view/ActionMode.Callback.html"><$c$c>ActionMode.Callback对象将管理情境模式的生命周期。 startActionMode 将返回一个<一个href="http://developer.android.com/reference/android/view/ActionMode.html"><$c$c>ActionMode对象,如果启动模式是成功的,或如果请求被拒绝了。

Call the startActionMode method available on any View or your Activity. This method accepts an ActionMode.Callback object that will manage the lifecycle of the contextual mode. startActionMode will return an ActionMode object if starting the mode was successful, or null if the request was rejected.

如果你是专门创建多重选择模式的ListView中,你可以走了一条捷径,并使用 CHOICE_MODE_MULTIPLE_MODAL

If you are specifically creating a multiple selection mode for a ListView, you can take a shortcut and use CHOICE_MODE_MULTIPLE_MODAL.

这篇关于上下文操作栏的蜂窝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆