Created
September 3, 2014 03:02
-
-
Save leonardocordeiro/8261b407c2870988f448 to your computer and use it in GitHub Desktop.
AlertUtils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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