今天研究android手风琴效果时翻了一下menu的文档,偶然发现里面多了很多内容。做一下总结:
根据官网的描述,上下文菜单从3.0开始有了一些变化,文档是这么说的:
Beginning with Android 3.0 (API level 11), Android-powered devices are no longer required to provide a dedicated Menu button. With this change, Android apps should migrate away from a dependence on the traditional 6-item menu panel and instead provide an action bar to present common user actions
所以在3.0及以上版本就引用了新的menu:
Options menu and action barIf you're developing for Android 2.3 or lower, users can reveal the options menu panel by pressing the Menu button.
On Android 3.0 and higher, items from the options menu are presented by the action bar as a combination of on-screen action items and overflow options. Beginning with Android 3.0, the Menu button is deprecated (some devices don't have one), so you should migrate toward using the action bar to provide access to actions and other options.
When developing for Android 3.0 and higher, you should instead use the contextual action mode to enable actions on selected content. This mode displays action items that affect the selected content in a bar at the top of the screen and allows the user to select multiple items.
从Android 3.0开始,系统不再强制提供专用的Menu按钮。应用应迁移到使用ActionBar来展示常用操作。对于2.3及以下版本,用户可以通过Menu按钮显示选项菜单。3.0及以上版本中,选项菜单项通过ActionBar呈现为屏幕上的操作项和溢出选项。同时引入了上下文操作模式以在选定的内容上启用操作。
1542

被折叠的 条评论
为什么被折叠?



