ContextMenu,称为上下文菜单,也就是长按界面不放,弹出的菜单.使用ContextMenu有三个步骤: (1)调用registerForContextMenu()方法,为视图注册上下文菜单: (2)重写Activity的onCreateContextMenu(ContextMenu menu,View v,ContextMenuInfo menuInfo)方法,调用Menu的add方法添加菜单项(MenuItem) (3)重写onContextItemSelected(MenuItem…