show Message
import android.app.Activity;
import android.app.ActivityManager;
import android.app.AlertDialog;
import android.app.ActivityManager.MemoryInfo;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.net.Uri;
import android.text.Html;
class Utils {
public static void showMessage(Context _context, String title, String message, int icon, DialogInterface.OnClickListener ackHandler) {
AlertDialog.Builder builder = new AlertDialog.Builder(_context);
builder.setTitle(title);
builder.setMessage(Html.fromHtml(message));
builder.setCancelable(false);
builder.setPositiveButton("Acknowledged", ackHandler);
builder.setIcon(icon);
builder.show();
}
}
Related examples in the same category