// Path: imageloadpk/src/main/java/com/example/imageloadpk/adapter/watcher/Drawables.java
// public class Drawables {
//     public static Drawable sPlaceholderDrawable;
//     public static Drawable sErrorDrawable;
// 
//     private Drawables() {
//     }
// 
//     public static void init(final Resources resources) {
//         if (sPlaceholderDrawable == null) {
//             sPlaceholderDrawable = resources.getDrawable(R.drawable.placeholder, null);
//         }
//         if (sErrorDrawable == null) {
//             sErrorDrawable = resources.getDrawable(R.drawable.error, null);
//         }
//     }
// }
// 
// Path: imageloadpk/src/main/java/com/example/imageloadpk/adapter/watcher/WatchListener.java
// public class WatchListener {
//     private long mRequestTotalTime;
//     private long mStartRequests;
//     private long mSuccessedRequests;
//     private long mFailedRequests;
//     private long mCancelledRequests;
// 
//     public void reportSuccess(long requestTime) {
//         mRequestTotalTime += requestTime;
//         mSuccessedRequests++;
//     }
// 
//     public void initData() {
//         mRequestTotalTime = 0;
//         mStartRequests = 0;
//         mSuccessedRequests = 0;
//         mFailedRequests = 0;
//         mCancelledRequests = 0;
//     }
// 
//     public void reportStart() {
//         mStartRequests++;
//     }
// 
//     public void reportCancelltion(long requestTime) {
//         mCancelledRequests++;
//         mRequestTotalTime += requestTime;
//     }
// 
//     public void reportFailure(long requestTime) {
//         mFailedRequests++;
//         mRequestTotalTime += requestTime;
//     }
// 
// 
//     public long getAverageRequestTime() {
//         final long completedRequests = getCompletedRequests();
//         return completedRequests > 0 ? mRequestTotalTime / completedRequests : 0;
//     }
// 
//     public long getCancelledRequests() {
//         return mCancelledRequests;
//     }
// 
//     public long getCompletedRequests() {
//         return mSuccessedRequests + mCancelledRequests + mFailedRequests;
//     }
// 
//     public long getTotalRequests() {
//         return mStartRequests;
//     }
// }


import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import com.example.imageloadpk.adapter.watcher.Drawables;
import com.example.imageloadpk.adapter.watcher.WatchListener;
import com.squareup.picasso.Picasso;
package com.example.imageloadpk.adapter.holders;



/**
 * Created by Administrator on 2016/7/4.
 */
public class PicassoHolder extends BaseHolder {
    private final Picasso mPicasso;

    public PicassoHolder(ImageView imageView, WatchListener watchListener, View parentView, Context context, Picasso picasso) {
        super(imageView, watchListener, parentView, context);
        mPicasso = picasso;
    }

    @Override
// Path: imageloadpk/src/main/java/com/example/imageloadpk/adapter/watcher/Drawables.java
// public class Drawables {
//     public static Drawable sPlaceholderDrawable;
//     public static Drawable sErrorDrawable;
// 
//     private Drawables() {
//     }
// 
//     public static void init(final Resources resources) {
//         if (sPlaceholderDrawable == null) {
//             sPlaceholderDrawable = resources.getDrawable(R.drawable.placeholder, null);
//         }
//         if (sErrorDrawable == null) {
//             sErrorDrawable = resources.getDrawable(R.drawable.error, null);
//         }
//     }
// }
// 
// Path: imageloadpk/src/main/java/com/example/imageloadpk/adapter/watcher/WatchListener.java
// public class WatchListener {
//     private long mRequestTotalTime;
//     private long mStartRequests;
//     private long mSuccessedRequests;
//     private long mFailedRequests;
//     private long mCancelledRequests;
// 
//     public void reportSuccess(long requestTime) {
//         mRequestTotalTime += requestTime;
//         mSuccessedRequests++;
//     }
// 
//     public void initData() {
//         mRequestTotalTime = 0;
//         mStartRequests = 0;
//         mSuccessedRequests = 0;
//         mFailedRequests = 0;
//         mCancelledRequests = 0;
//     }
// 
//     public void reportStart() {
//         mStartRequests++;
//     }
// 
//     public void reportCancelltion(long requestTime) {
//         mCancelledRequests++;
//         mRequestTotalTime += requestTime;
//     }
// 
//     public void reportFailure(long requestTime) {
//         mFailedRequests++;
//         mRequestTotalTime += requestTime;
//     }
// 
// 
//     public long getAverageRequestTime() {
//         final long completedRequests = getCompletedRequests();
//         return completedRequests > 0 ? mRequestTotalTime / completedRequests : 0;
//     }
// 
//     public long getCancelledRequests() {
//         return mCancelledRequests;
//     }
// 
//     public long getCompletedRequests() {
//         return mSuccessedRequests + mCancelledRequests + mFailedRequests;
//     }
// 
//     public long getTotalRequests() {
//         return mStartRequests;
//     }
// }


// Path: imageloadpk/src/main/java/com/example/imageloadpk/adapter/holders/PicassoHolder.java
import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import com.example.imageloadpk.adapter.watcher.Drawables;
import com.example.imageloadpk.adapter.watcher.WatchListener;
import com.squareup.picasso.Picasso;

package com.example.imageloadpk.adapter.holders;



/**
 * Created by Administrator on 2016/7/4.
 */
public class PicassoHolder extends BaseHolder {
    private final Picasso mPicasso;

    public PicassoHolder(ImageView imageView, WatchListener watchListener, View parentView, Context context, Picasso picasso) {
        super(imageView, watchListener, parentView, context);
        mPicasso = picasso;
    }

    @Override
    protected void onBind(String url) {