Featured Post

NoSQL use cases

Here are a simple summary of use cases for Cassandra, MongoDB and Redis MongoDB Storing Log Data Speed is the primary perfor...

Tuesday, January 17, 2017

Dialog Android

Dialog Example


import android.app.AlertDialog;
import android.content.DialogInterface;

import com.example.myapp.R;

public class NotificationDialog {

 public static void dialog(android.content.Context activity, int title, int message) {
    AlertDialog.Builder builder = new AlertDialog.Builder(activity);

    builder = builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int id) {
    builder = builder.setTitle(title).setMessage(message).setIcon(R.drawable.dialogo_alert);



No comments :

Post a Comment