Java Code Examples for com.android.volley.RequestQueue#RequestFilter
The following examples show how to use
com.android.volley.RequestQueue#RequestFilter .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VolleyImageNetworkHandler.java From wasp with Apache License 2.0 | 5 votes |
@Override public void cancelRequest(final String tag) { Logger.w("CANCEL REQUEST -> url : " + tag); RequestQueue.RequestFilter filter = new RequestQueue.RequestFilter() { @Override public boolean apply(Request<?> request) { return tag.equals(request.getTag()); } }; requestQueue.cancelAll(filter); }
Example 2
Source File: RequestQueueManager.java From Hentoid with Apache License 2.0 | 4 votes |
/** * Cancel the app's request queue : cancel all requests remaining in the queue */ void cancelQueue() { RequestQueue.RequestFilter filterForAll = request -> true; mRequestQueue.cancelAll(filterForAll); Timber.d("RequestQueue ::: canceled"); }
Example 3
Source File: Crossbow.java From CrossBow with Apache License 2.0 | 4 votes |
/** * Cancels all requests in the request queue that match a certain filter */ public void cancelAll(RequestQueue.RequestFilter requestFilter) { requestQueue.cancelAll(requestFilter); }