Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * doAlert() für Warn- und Rückfragedialoge
- *
- * @param mixed context
- * @param mixed title
- * @param mixed message
- * @param boolean status
- */
- @SuppressWarnings("deprecation")
- public void doAlert(Context context, String title, String message, Boolean status) {
- AlertDialog alertDialog = new AlertDialog.Builder(context).create();
- alertDialog.setTitle(title); // Titel
- alertDialog.setMessage(message); // Nachricht
- if (status != null) {
- alertDialog.setIcon((status) ? R.drawable.success : R.drawable.fail); // Icon Bild
- }
- // OK Button
- alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(final DialogInterface dialog, final int which) {
- }
- });
- alertDialog.show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement