ContextMenu setHeaderTitle
<pre><code>public void getData(String empid)
{
    Cursor cursor = assignment.getAcceptedTasks(empid);
    startManagingCursor(cursor);
    list = (ListView) findViewById(R.id.list);
    list.setOnItemClickListener(new OnItemClickListener() { 

        public void onItemClick(AdapterView&lt;?&gt; adapterView, View v, int arg2,
                long arg3) {
            startActivity(new Intent(v.getContext(), TaskDetails.class));               
        } 
    }); 
    SimpleCursorAdapter adapter = new SimpleCursorAdapter (this, R.layout.mytaskslayout, cursor, new String[] {"Aircraft","Discrepancy"}, new int[] {R.id.ac, R.id.discrepancy});
    list.setAdapter(adapter);
    registerForContextMenu(list);
}

    } 
} 

//@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
  if (v.getId()==R.id.list)  {
    AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)menuInfo;
    menu.setHeaderTitle("");
    menu.add(0,  v.getId(), 0, "View Details");
    menu.add(0,  v.getId(), 0, "Close - Accomplished");
    menu.add(0,  v.getId(), 0, "Close - No Action Required");
  }
}
</code></pre>

<p>I want to set "Discrepancy" as a HeaderTitle of a Context menu. How do I do that ...</p>
