Show alert dialog for Message - Android User Interface

Android examples for User Interface:Alert Dialog

Description

Show alert dialog for Message

Demo Code


//package com.java2s;
import android.app.AlertDialog;
import android.content.Context;

public class Main {
    public static void alertMessage(Context context, String msg) {
        AlertDialog alertBuilder = new AlertDialog.Builder(context)
                .create();//from  w w  w  .  ja  v  a2s .  c om
        alertBuilder.setMessage(msg);
        alertBuilder.show();
    }
}

Related Tutorials