Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.djodjo.comm.jus.util;
 import  android.content.Context;
 import  org.djodjo.comm.jus.RequestQueue;
 import  org.djodjo.comm.jus.toolbox.ImageLoader;
 import  org.djodjo.comm.jus.Jus;
public class JusHelper {
    private static RequestQueue mRequestQueue;
    private static ImageLoader mImageLoader;
    private JusHelper() {
        // no instances
    public static void init(Context context) {
         = Jus.newRequestQueue(context);
         = new ImageLoader(,
                // new NoCache()
                new DefaultBitmapLruCache()
    public static RequestQueue getRequestQueue() {
        if ( != null) {
            return ;
        } else {
            throw new IllegalStateException("RequestQueue not initialized");

Returns instance of ImageLoader initialized with FakeImageCache which effectively means that no memory caching is used. This is useful for images that you know that will be show only once.

    public static ImageLoader getImageLoader() {
        if ( != null) {
            return ;
        } else {
            throw new IllegalStateException("ImageLoader not initialized");
New to GrepCode? Check out our FAQ X