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.app.Dialog;
import android.content.Context;

public class Main {
    public static void showDialogAlert(Context ctx, String title, String body) {
        AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
        builder.setTitle(title);
        builder.setMessage(body);
        Dialog dialogDetails = builder.create();
        dialogDetails.setCanceledOnTouchOutside(true);
        dialogDetails.show();
    }
}