Android Open Source - unicef_gis_mobile Alert Dialog Fragment

From Project

Back to project page unicef_gis_mobile.


The source code is released under:

MIT License

If you think the Android project unicef_gis_mobile listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.unicef.gis.ui;
//  w ww.  ja  va2  s. c  om
import android.content.DialogInterface;
import android.os.Bundle;

public class AlertDialogFragment extends DialogFragment {
  private int title;
  private int prompt;
  public void setTitle(int title) {
    this.title = title;
  public void setPrompt(int prompt) {
    this.prompt = prompt;

  public Dialog onCreateDialog(Bundle savedInstanceState) {
    // Use the Builder class for convenient dialog construction
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
               .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
                   public void onClick(DialogInterface dialog, int id) {}
        // Create the AlertDialog object and return it
        return builder.create();

Java Source Code List