Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.app.AlertDialog;
import android.content.Context;

public class Main {
    /**
     * @param s
     *            The alert message Displays an alert dialog with the messaged
     *            provided
     */
    public static void showAlert(Context context, String mesg) {
        AlertDialog.Builder alt_bld = new AlertDialog.Builder(context);
        alt_bld.setMessage(mesg).setPositiveButton(android.R.string.ok, null);
        AlertDialog alert = alt_bld.create();
        alert.show();
    }
}