Android ListView ContextMenu
<p>I'm trying to create a context menu when user tap hold on an item in my listview. However my codes doesnt show anything when I tap hold on my item. Could somebody please check on my codes. Thank you</p>

<pre><code>public class MyD extends SherlockListFragment implements
        ActionBar.TabListener {

    private File file;
    private List&lt;String&gt; myList;

    private Fragment mFragment;

    private ListView DLListView;
    private ArrayAdapter&lt;String&gt; listAdapter;

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        getActivity().setContentView(R.layout.dl_listview);

        View empty = getActivity().findViewById(R.id.empty);
        DLListView = (ListView) getActivity().findViewById(R.id.DLListView);
        DLListView.setEmptyView(empty);

        if (!Environment.getExternalStorageState().equals(
                Environment.MEDIA_MOUNTED)) {
            Toast.makeText(getActivity(),
                    "Error! No SDCARD Found!",
                    Toast.LENGTH_LONG).show();
        } else {
            File directory = new File(Environment.getExternalStorageDirectory()
                    + File.separator + "St");
            directory.mkdirs();
        }
        DLListView = (ListView) getActivity().findViewById(R.id.DLListView);

        myList = new ArrayList&lt;String&gt;();

        File sdCard = Environment.getExternalStorageDirectory();
        file = new File(sdCard.getAbsolutePath() + "/St/");

        File list[] = file.listFiles();

        for (int i = 0; i &lt; list.length; i++) {
            String fileName = list[i].getName();
            fileName = fileName.replace(".txt", "");
            myList.add(fileName);

        }

        listAdapter = new ArrayAdapter&lt;String&gt;(getActivity(),
                R.layout.simplerow, myList);

        DLListView.setAdapter(listAdapter);

        DLListView.setOnItemClickListener(new OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                    int position, long id) {
                // TODO Auto-generated method stub
                String textToPass = myList.get(position);
                Intent i = new Intent(getActivity(), ViewActivity.class);
                textToPass = textToPass.replace(textToPass + "", textToPass
                        + ".txt");
                i.putExtra("textToPass", textToPass);
                startActivity(i);
            }
        });

    DLListView.setOnItemLongClickListener(new OnItemLongClickListener() {

    @Override
    public boolean onItemLongClick(AdapterView&lt;?&gt; parent, View view,
            int position, long id) {
        // TODO Auto-generated method stub
        return false;
    }
});

}

    public void onCreateContextMenu(ContextMenu menu, View v,ContextMenuInfo menuInfo)
    {
       super.onCreateContextMenu(menu, v, menuInfo);
       AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;
       String name = ((TextView) info.targetView).getText().toString();
       menu.setHeaderTitle(name);      
       menu.add(0,v.getId(), 0, "Play");    
       menu.add(0,v.getId(),1,"Delete"); 
    }
</code></pre>
