Contextual Action Bar in Honeycomb

﹥>﹥吖頭↗ 提交于 2019-11-30 02:46:10

问题


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.

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

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

Does anyone have any idea how to do this?


回答1:


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.

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



来源:https://stackoverflow.com/questions/6003102/contextual-action-bar-in-honeycomb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!