摘要: 子菜单是可以被添加到其它菜单上的菜单,但是子菜单不能添加到子菜单上。通常,当需要有大量的菜单项需要显示时,利用子菜单进行分类是一个很好的方法main.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="mat 阅读全文
posted @ 2012-08-05 16:13 挡不住会飞的鸡 阅读(987) 评论(0) 推荐(0) 编辑
摘要: ContextMenu是一种悬浮于主界面上的菜单。当注册到一个View对象上时,默认情况下可以长按View对象约2秒钟呼出上下文菜单。Context menus do not support item shortcuts and item icons:不支持快捷键和显示图标。To show a context menu on long click, most clients will want to callregisterForContextMenu(View) and override onCreateContextMenu(ContextMenu, View, ContextMenu.C 阅读全文
posted @ 2012-08-05 07:37 挡不住会飞的鸡 阅读(482) 评论(0) 推荐(0) 编辑
摘要: Android平台提供的菜单课分为三大类:选项菜单(OptionsMenu)、上下文菜单(ContextMenu)以及子菜单(SubMenu)。Options Menu:按下手机的Menu键,在屏幕底部会出现带图标的菜单项,最多只能显示6个。Context Menu: Do not support item shortcuts and item icons.(不支持快捷键和显示图标)Sub menus: Do not support item icons, or nested sub menus.(不支持显示图标和嵌套的子菜单)对OptionsMenu的操作分为三步:1、重新实现onCreat 阅读全文
posted @ 2012-08-05 07:15 挡不住会飞的鸡 阅读(164) 评论(0) 推荐(0) 编辑