All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.solovyev.android.http.HttpRemoteFileService Maven / Gradle / Ivy

There is a newer version: 1.1.18
Show newest version
package org.solovyev.android.http;

import android.content.Context;
import android.widget.ImageView;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * User: serso
 * Date: 6/2/12
 * Time: 11:22 PM
 */
public class HttpRemoteFileService implements RemoteFileService {

    private static final String TAG = "RemoteFileService";

    /*
    **********************************************************************
    *
    *                           SERVICE
    *
    **********************************************************************
    */

    @NotNull
    private final ImageLoader imageLoader;

    public HttpRemoteFileService(@NotNull Context context, @NotNull String cacheFileName) {
        this.imageLoader = new ImageLoaderImpl(context, cacheFileName);
    }

    @Override
    public void loadImage(@NotNull String uri,
                          @NotNull ImageView imageView,
                          @Nullable Integer defaultImageId) {
        imageLoader.loadImage(uri, imageView, defaultImageId);
    }

    @Override
    public void loadImage(@NotNull String uri, @NotNull OnImageLoadedListener imageLoadedListener) {
        imageLoader.loadImage(uri, imageLoadedListener);
    }

    @Override
    public void loadImage(@NotNull String uri) {
        imageLoader.loadImage(uri);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy