@Override protected void onPreExecute() { super.onPreExecute(); pDialog = new ProgressDialog(activity); pDialog.setMessage("Listing Clinic ..."); pDialog.setIndeterminate(false); pDialog.setCancelable(false); pDialog.show(); activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR); }
protected void onPostExecute(String pjson) { if (activity == null) { Log.w("RotationAsync", "onPostExecute() skipped -- no activity"); } else { activity.CreateList(pjson); } try { pDialog.dismiss(); pDialog = null; } catch (Exception e) { Log.v("OnPOSTExecute", "ERROR"); e.printStackTrace(); } }