Example usage for android.app Dialog setVolumeControlStream

List of usage examples for android.app Dialog setVolumeControlStream

Introduction

In this page you can find the example usage for android.app Dialog setVolumeControlStream.

Prototype

public final void setVolumeControlStream(int streamType) 

Source Link

Document

By default, this will use the owner Activity's suggested stream type.

Usage

From source file:Main.java

public static void showDialogOk(String title, String message, Context context) {
    if (context != null) {
        Dialog dlg = new AlertDialog.Builder(context).setTitle(title).setMessage(message)
                .setPositiveButton("OK", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int whichButton) {

                    }/*  ww w . ja  v  a 2 s.  c om*/
                }).create();
        dlg.setVolumeControlStream(AudioManager.STREAM_MUSIC);
        dlg.show();
    }
}