Featured Post

Scalability Techniques

Scalability is about the capability of a system to manage the increase workload of a system without causing qualities impact (i.e. perfo...

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