Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.media.AudioManager;

public class Main {
    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) {

                        }
                    }).create();
            dlg.setVolumeControlStream(AudioManager.STREAM_MUSIC);
            dlg.show();
        }
    }
}