public void onClick(DialogInterface dialog, int id) { // User clicked OK button } } }); builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { // User cancelled the dialog } }); AlertDialog dialog = builder.create(); dialog.show(); Android programming
be saved in shared preferences. After the login the applications show me the list of color’s names, if I click on a color’s name a dialog will popup to ask me if I want to save that color name on my internal storage. Android programming