Announcement

Collapse
No announcement yet.

class in der MainActivity ausführen

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • class in der MainActivity ausführen

    wie kann ich diese class in der MainActivity ausführen?

    class FireMissilesDialogFragment extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { // Use the Builder class for convenient dialog construction AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setMessage(R.string.dialog_fire_missiles) .setPositiveButton("fire", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { // FIRE ZE MISSILES! } }) .setNegativeButton("cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { // User cancelled the dialog } }); // Create the AlertDialog object and return it return builder.create(); } }

  • #2
    Super formatierter Code und....
    Crosspost
    https://www.nextpit.de/forum/815459/...ity-ausfuehren
    geschlossen
    Christian

    Comment

    Working...
    X