My Activity is trying to create an AlertDialog which requires a Context as a parameter. This works as expected if I use:
AlertDialog.Builder builder = new Al
If you are using a fragment and using AlertDialog/Toast message then use getActivity() in the context parameter.
like this
ProgressDialog pdialog; pdialog = new ProgressDialog(getActivity()); pdialog.setCancelable(true); pdialog.setMessage("Loading ...."); pdialog.show();