Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DialogUtils {
- public static ProgressDialog showProgressDialog(Context context, String message) {
- ProgressDialog m_Dialog = new ProgressDialog(context);
- m_Dialog.setMessage(message);
- m_Dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
- m_Dialog.setCancelable(false);
- m_Dialog.show();
- return m_Dialog;
- }
- m_Dialog = DialogUtils.showProgressDialog(getContext(), "Loading...");
- final String m_DealListingURL = "http://202.131.1.132:8080/ireward/rest/json/metallica/getDealListInJSON";
- JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, m_DealListingURL, jsonObject, new Response.Listener<JSONObject>() {
- @Override
- public void onResponse(JSONObject response) {
- Log.i(TAG, "Server Response:-" + response);
- if (m_Dialog != null && m_Dialog.isShowing()) {
- m_Dialog.dismiss();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement