Back to project page amulet.
The source code is released under:
MIT License
If you think the Android project amulet 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 scamell.michael.amulet; /*from w w w . ja va 2 s . c o m*/ import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.DialogFragment; //http://developer.android.com/guide/topics/ui/dialogs.html public class ExampleDrinksDialogFragment extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setTitle("Typical Drinks") .setItems(R.array.drink_type_array, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { Intent intent = new Intent(); intent.putExtra("drinkExample", which); getTargetFragment().onActivityResult(getTargetRequestCode(), 1234, intent); } }); return builder.create(); } }