View PlGroup GUI, Dialoge
ID | 31 |
---|---|
Text | GUI, Dialoge |
Title | Not set |
PlItems
- AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("Hinweis") .setTitle("Hinweis-Meldung") .setNeutralButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show();
- // siehe auch : http://developer.android.com/guide/topics/ui/dialogs.html AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("Are you sure you want to exit?") .setCancelable(false) .setPositiveButton("Yes", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { WhatHaveYouDoneActivity.this.finish(); } }) .setNegativeButton("No", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show();