title: How to run Volley in fragment(Navigation Drawer)?
body: <p>I want to call volley by clicking new item in navigation drawer.<br>
  How to run Volley from Fragment?
  I can run volley easily in activities but it is showing error in "this". i.e.</p>
  
  <pre><code>// Instantiate the RequestQueue.
  RequestQueue queue = Volley.newRequestQueue(this);
  </code></pre>
  
  <p>in above code
  How to run volley in Fragment?
  in Navigation Drawer?</p>
  
  <p>I am doing this:</p>
  
  <pre><code> public CollegesFragment() {
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.fragment_colleges, container, false);
  
  
          // Instantiate the RequestQueue.
     RequestQueue queue = Volley.newRequestQueue(this);
  
  
  
          // Request a string response from the provided URL.
          StringRequest stringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener&lt;String&gt;() {
              @Override
              public void onResponse(String response) {
                  // Display the first 500 characters of the response string.
                  Toast.makeText(getActivity(), response, Toast.LENGTH_LONG).show();
                  Log.d("TAG", "hello");
              }
          }, new Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError error) {
  
              }
          });
  
          return rootView;
      }
  </code></pre>
  
  <p>please give me idea.</p>