android单击控件弹出contentmenu

1、在相应的activity中实现onCreateContextMenu和onContextItemSelected方法。

2、实现registerForContextMenu(View v)方法,其中参数为待操作的控件。

3、在相应的v的监听器(onclick等)中实现方法v.showContextMenu();

posted @ 2014-03-14 15:13  freedomCoder  阅读(415)  评论(0)    收藏  举报