showDialog( DIALOG_CREATEPC ); // called elsewhere
private Dialog addPCDialog()
{
final Dialog dialog = new Dialog( this );
dialog.setContentView( R.layout.party_createpc );
dialog.setTitle( "Add PC" );
...
return dialog
}
@Override
protected Dialog onCreateDialog( int id )
{
Dialog dialog;
switch( id )
{
case DIALOG_CREATEPC:
dialog = addPCDialog();
break;
default:
dialog = null;
}
return dialog;
}
我在这里遗漏了什么吗?该对话框根本没有显示。