Android Open Source - o365api-android-get-events-app Simple Alert Dialog






From Project

Back to project page o365api-android-get-events-app.

License

The source code is released under:

MIT License

If you think the Android project o365api-android-get-events-app listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.mattleib.myinboxapplication;
/* w  w  w  .  j a  v a  2  s  .c o  m*/
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

/**
 * Created by mattleib on 1/27/2015.
 */
public class SimpleAlertDialog {
    /**
     * show simple Alert Dialog
     * */
    public static void showAlertDialog(Context context, String title, String message) {
        AlertDialog.Builder dialog = new AlertDialog.Builder(context);
        dialog.setTitle(title)
                .setMessage(message)
                .setNegativeButton("Close",
                        new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int id) {
                                dialog.cancel();
                            }
                        })
                        // Setting OK Button
                .setPositiveButton("OK", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int which) {
                    }
                });

        // Showing Alert Message
        AlertDialog alert = dialog.create();
        alert.show();
    }
}




Java Source Code List

com.example.mattleib.myinboxapplication.AppConfig.java
com.example.mattleib.myinboxapplication.AppHelper.java
com.example.mattleib.myinboxapplication.ApplicationTest.java
com.example.mattleib.myinboxapplication.Constants.java
com.example.mattleib.myinboxapplication.DataTypes.java
com.example.mattleib.myinboxapplication.EmailAddress.java
com.example.mattleib.myinboxapplication.EmptyItem.java
com.example.mattleib.myinboxapplication.EventItem.java
com.example.mattleib.myinboxapplication.EventItemsFragment.java
com.example.mattleib.myinboxapplication.Helpers.java
com.example.mattleib.myinboxapplication.InMemoryCacheStore.java
com.example.mattleib.myinboxapplication.Item.java
com.example.mattleib.myinboxapplication.LocalDateTimeConverter.java
com.example.mattleib.myinboxapplication.Location.java
com.example.mattleib.myinboxapplication.MainActivity.java
com.example.mattleib.myinboxapplication.Organizer.java
com.example.mattleib.myinboxapplication.PreferenceSetting.java
com.example.mattleib.myinboxapplication.PreferenceSettings.java
com.example.mattleib.myinboxapplication.SectionItem.java
com.example.mattleib.myinboxapplication.SettingsActivity.java
com.example.mattleib.myinboxapplication.SettingsFragment.java
com.example.mattleib.myinboxapplication.SimpleAlertDialog.java