2012年3月26日

从头学Android之ContexMenu上下文菜单

摘要: 什么是上下文菜单:有时候我们也可以叫做快键菜单。例如我们在电脑桌面右键所看到的菜单就是快捷菜单,也叫上下文菜单,叫上下文菜单是因为Context翻译成为上下文的意思创建上下文ContextMenu菜单的步骤:1、 覆盖Activity的onCreateContextMenu()方法,调用Menu的add方法添加菜单项2、 覆盖onContexItemSelected()方法,响应菜单单击事件3、 调用registerForContexMenu()方法为视力注册上下文菜单public void onCreateContextMenu (ContextMenu menu,View v,Contex 阅读全文

posted @ 2012-03-26 23:33 vus520 阅读(595) 评论(0) 推荐(0) 编辑

导航