Skip to content

Instantly share code, notes, and snippets.

@leonardocordeiro
Created September 3, 2014 03:02
Show Gist options
  • Save leonardocordeiro/8261b407c2870988f448 to your computer and use it in GitHub Desktop.
Save leonardocordeiro/8261b407c2870988f448 to your computer and use it in GitHub Desktop.
AlertUtils
class AlertUtils {
private AlertDialog build(Context ctx, String title, String text){
return new AlertDialog.Builder(ctx)
.setCancelable(true)
.setTitle(title)
.setMessage(text)
.create();
}
public void show(Context ctx, String title, String text) {
AlertDialog dialog = build(ctx, title, text);
dialog.show();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment