有人可以将我指向列表视图中的上下文菜单吗

Could someone point me to a context menu in a listview

我正在尝试向我的应用添加功能。这是列表视图中每个项目的菜单(上下文 menu/option 菜单)。但是,我在查找有关如何执行此操作的教程或文章时遇到问题。菜单与图片上的菜单类似。 http://pctechtips.org/pics/android_listview_menu.png。从那以后我不会 post 任何代码。这是应用程序的 github。 https://github.com/zentech/Netdroid

我只想有人告诉我从哪里开始 谢谢

您只需在点击适配器内的 3 点图像时显示弹出菜单

代码:

//Creating the instance of PopupMenu
            final PopupMenu popup = new PopupMenu(activity, level);
            //Inflating the Popup using xml file
            popup.getMenuInflater().inflate(R.menu.popup_level, popup.getMenu());

            //registering popup with OnMenuItemClickListener
            popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
                public boolean onMenuItemClick(MenuItem item) {
                    level.setText(item.getTitle());
                    return true;
                }
            });

menuImage.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {          

            popup.show();//showing popup menu
        }
    });

tutorial here