Back to project page AndroidFileBroadcast.
The source code is released under:
Apache License
If you think the Android project AndroidFileBroadcast 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.common.methods; /*from w w w . java 2 s . c o m*/ import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; public class AlertCreator { void create(Context ctx,String Title,String Message) { AlertDialog.Builder myAlertDialog = new AlertDialog.Builder(ctx); myAlertDialog.setTitle("--- Title ---"); myAlertDialog.setMessage("Alert Dialog Message"); myAlertDialog.setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface arg0, int arg1) { // do something when the OK button is clicked } }); myAlertDialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface arg0, int arg1) { // do something when the Cancel button is clicked } }); myAlertDialog.show(); } }