Your class should subclass DialogFragment
, not FragmentActivity
. Be sure to @Override
the onCreateDialog(...)
method. You can also get rid of your onCreate(...)
method as that is not needed with a DialogFragment
.
To display the DialogFragment
, instead of using an Intent
like you would for an Activity
, do the following from your map activity. Note that I renamed your class because now it is not an Activity
but rather a Dialog
:
adminDialog= new AdminDialog();
adnimDialog.show(getFragmentManager(), "custom-tag-goes-here");