package ch.pizzapp.android.helper;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.squareup.picasso.Picasso;

import ch.pizzapp.android.activity.BaseActivity;

public class ImageLoadHelper {

    public static void loadImage(ImageView imageView, String url){

        if(url == null || url.isEmpty())
            url = "empty";

        Picasso.with(BaseActivity.currentActivity)
                .load(url)
                //.placeholder(R.drawable.placeholder)
                //.placeholder(R.drawable.progress_animation)
                //.error(R.drawable.placeholder)
                //.resize(500, 0)
                //.onlyScaleDown()
                .into(imageView);
    }

}
