Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.app.Activity;
import android.app.AlertDialog;

import android.content.DialogInterface;

public class Main {
    public static void showTipDialog(Activity activity, String title, String dismiss) {

        AlertDialog.Builder builder = new AlertDialog.Builder(activity).setTitle(title).setNegativeButton(dismiss,
                new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                    }
                });
        AlertDialog alertDialog = builder.create();
        builder.show();
    }
}