一.概述 Android中,上下文菜单是通过onLongClick(...)事件访问的.在事件触发后显示菜单项. 在使用上下文菜单时,通常在onCreate(...)方法中,先行注册上下文菜单.在实现onCreateContextMenu(...)方法和onContextItemSelected(...)方法. 注册菜单方法:registerForContextMenu(...) 注销注册菜单方法:unregisterForContextMenu(...) 二.使用XML文件添加上下文菜单 te