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.
package org.unicef.gis.ui; // w ww. ja va2 s. c om import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; 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; } @Override public Dialog onCreateDialog(Bundle savedInstanceState) { // Use the Builder class for convenient dialog construction AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setMessage(prompt) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) {} }) .setTitle(title); // Create the AlertDialog object and return it return builder.create(); } }