onContextItemSelected is not being called when in Dialog
<p>I have a dialog in my app and when the button in dialog was click, a context menu will show. But my problem is the onContextItemSelected is not being called. My code is working in other button outside the dialog.</p>

<p>here is my codes:</p>

<pre><code>dialog = new Dialog(SuperPizzaActivity.this, R.style.DialogSlideAnim);
dialog.setTitle("Select Size and Crust");
dialog.setContentView(R.layout.pizzadialog);
final Button select = (Button) dialog.findViewById(R.id.superpizzadselect);

select.setOnCreateContextMenuListener(new View.OnCreateContextMenuListener() {

public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo) {
// TODO Auto-generated method stub
menu.setHeaderTitle("Choose One");
menu.add(1, 1, 1, "Add Chicken");
menu.add(2, 2, 2, "Add Pasta");
menu.add(3, 3, 3, "Add Drinks");
menu.add(4, 4, 4, "Continue");
}
});

select.setOnClickListener(new View.OnClickListener() {

public void onClick(View v) {
// TODO Auto-generated method stub
openContextMenu(v);
}
});



     public boolean onContextItemSelected(MenuItem item) {
            AdapterContextMenuInfo info = (AdapterContextMenuInfo) item
            .getMenuInfo();

            switch (item.getItemId()) {
            case 1:
                dialog.dismiss();
                Intent i1 = new Intent(SuperPizzaActivity.this,SuperChickenActivity.class);
                i1.putExtra(checker, checker);
                startActivity(i1);
                overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);        
                break;

            case 2:
                dialog.dismiss();
                Intent i = new Intent(SuperPizzaActivity.this,SuperPastaActivity.class);
                i.putExtra(checker, checker);
                startActivity(i);
                overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
                break;

            case 3:
                dialog.dismiss();
                Intent i2 = new Intent(SuperPizzaActivity.this,SuperDrinksActivity.class);
                i2.putExtra(checker, checker);
                startActivity(i2);
                overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
                break;

            case 4:
                dialog.dismiss();
                Intent i3 = new Intent(SuperPizzaActivity.this,SuperSummaryList.class);
                startActivity(i3);
                overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
                break;

            }
            return true;
            }
</code></pre>

<p>Any thoughts will be appreciated.</p>
