AlertDialog

new AlertDialog.Builder(MainActivity.this)
        .setTitle("Difficulty")
        .setItems(
                new String[]{"easy", "medium", "hard"},
                new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialogInterface, int idx) {
                    //...
                }
            }
        )
        .show();


你可能感兴趣的:(AlertDialog)