How to make a new newRequestQueue In Volley, Android
the parameter of newRequestQueue
is a Context object. In your case, this, refers to the View.OnClickListener
anonymous inner class, where you are calling newRequestQueue
. Change
Volley.newRequestQueue(this);
with
Volley.newRequestQueue(getActivity().getApplicationContext());
is, of course, getActivity()
because you are subclassing Fragment