Android-Show Custom Dialog
问题 In my android application, I am using a custom dialog. When I try to show the dialog, it causes an error. I don't know what I am doing wrong, and I am really confused. Here is my code: protected Dialog onCreateDialog(int id) { Dialog dialog; switch(id) { case 0: dialog = new Dialog(getApplicationContext()); dialog.setContentView(R.layout.paused); dialog.setTitle("Game Paused"); dialog.show(); break; default: dialog = null; } return null; } And here is how I show the dialog showDialog(0); By