List of usage examples for android.app AlertDialog setVolumeControlStream
public final void setVolumeControlStream(int streamType)
From source file:Main.java
public static void showDialogOkWithGoBack(String title, String message, final Activity activity) { if (activity.getApplicationContext() != null) { AlertDialog.Builder adb = new AlertDialog.Builder(activity); adb.setTitle(title);/* w w w .ja va2 s . c o m*/ adb.setMessage(message); adb.setCancelable(false); adb.setNeutralButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); //activity.onBackPressed(); } }); AlertDialog ad = adb.create(); ad.setVolumeControlStream(AudioManager.STREAM_MUSIC); ad.show(); } }