add Message Ok Alert Dialog - Android User Interface

Android examples for User Interface:Alert Dialog

Description

add Message Ok Alert Dialog

Demo Code


//package com.java2s;
import android.app.Activity;
import android.app.AlertDialog;

public class Main {

    public static void addMsgOk(Activity activity, String titulo,
            String msg, int icone) {
        AlertDialog.Builder builderDialog = new AlertDialog.Builder(
                activity);//from   w  ww.  j ava  2s.com
        builderDialog.setTitle(titulo);
        builderDialog.setMessage(msg);
        builderDialog.setNeutralButton("Ok", null);
        builderDialog.setIcon(icone);
        builderDialog.show();
    }
}

Related Tutorials