Assuming setnegativebutton is required, the following 2 results were found.
{ public void onClick(DialogInterface arg0, int arg1) { // Some stuff to do when ok got clicked } }) .setNegativeButton("cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface arg0, int arg1) { // Some stuff to do when...
startActivityForResult(choosePictureIntent, RESULT_LOAD_IMAGE); } }); b.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } });...