@Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.list_menu, menu); }In this example, we are inflating a menu resource (R.menu.list_menu) and attaching it to the context menu. This resource file will contain all of the options we want to display in the context menu. The package library for this method is android.app.