Back to project page yahtzee4android.
The source code is released under:
GNU General Public License
If you think the Android project yahtzee4android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.tum.yahtzee.services; // w ww. j ava 2 s . c o m import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; public class MessageService { public static void showMessage(Context context, String title, String message) { AlertDialog.Builder alertDialog_build = new AlertDialog.Builder(context); alertDialog_build.setCancelable(false); alertDialog_build.setTitle(title); alertDialog_build.setMessage(message); alertDialog_build.setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); AlertDialog alertDialog = alertDialog_build.create(); alertDialog.show(); } public static void showMessage(Context context, String title, String message, final MethodPointer methodPointer) { AlertDialog.Builder alertDialog_build = new AlertDialog.Builder(context); alertDialog_build.setCancelable(false); alertDialog_build.setTitle(title); alertDialog_build.setMessage(message); alertDialog_build.setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); methodPointer.execute(); } }); AlertDialog alertDialog = alertDialog_build.create(); alertDialog.show(); } }