show Dialog - Android User Interface

Android examples for User Interface:Dialog

Description

show Dialog

Demo Code


//package com.java2s;

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

public class Main {
    public static void showDialog(Context context, String button,
            String title, String message) {
        new AlertDialog.Builder(context).setTitle(title)
                .setMessage(message).setNeutralButton(button, null)
                .create().show();//from   w ww.  j a v a  2 s  . c  om
    }
}

Related Tutorials