What is the modal selection selection mode?

最后都变了- 提交于 2019-12-03 03:17:41

This is used to bring up an action mode (a.k.a., contextual action bar) when using action bars. You will see it in apps like Gmail: as you start checking items in the list, the action bar changes from generic activity-level actions to operations to be performed on the list (e.g., change labels, trash).

Like CHOICE_MODE_MULTIPLE, you need your ListView to be populated by Checkable items. Then, though, once one or more items are checked, Android will automatically pop up your chosen action mode, which you can configure with your own actions.

Here is a sample project that demonstrates this: https://github.com/commonsguy/cw-omnibus/tree/master/ActionMode/ActionModeMC

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