Skip to content

Commit

Permalink
提交确实文件
Browse files Browse the repository at this point in the history
  • Loading branch information
Freeman committed Dec 19, 2019
1 parent 6773eb8 commit 233f336
Show file tree
Hide file tree
Showing 17 changed files with 1,479 additions and 6 deletions.
14 changes: 14 additions & 0 deletions .idea/assetWizardSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
Binary file added .idea/caches/gradle_models.ser
Binary file not shown.
16 changes: 16 additions & 0 deletions .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

456 changes: 456 additions & 0 deletions .idea/dbnavigator.xml

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

@@ -0,0 +1,80 @@
package com.sxu.smartpicture.imageloader;

import android.content.Context;
import android.util.Log;

import com.sxu.smartpicture.imageloader.instance.ImageLoaderInstance;
import com.sxu.smartpicture.imageloader.listener.ImageLoaderListener;

/**
* 类或接口的描述信息
*
* @author Freeman
* @date 2017/12/5
*/


public class ImageLoaderManager {

private ImageLoaderInstance mLoaderInstance;

protected ImageLoaderManager() {

}

public static ImageLoaderManager getInstance() {
return Singleton.instance;
}

public void init(Context context, ImageLoaderInstance loaderInstance) {
if (loaderInstance == null) {
throw new IllegalArgumentException("loaderInstance can't be null");
} else if (mLoaderInstance != null) {
Log.w("out", "ImageLoaderManager has initialized!!!");
} else {
synchronized (this) {
mLoaderInstance = loaderInstance;
mLoaderInstance.init(context);
}
}
}

public boolean isInit() {
return mLoaderInstance != null;
}

public ImageLoaderInstance getImageLoaderInstance() {
return mLoaderInstance;
}

public void displayImage(String url, WrapImageView imageView) {
mLoaderInstance.displayImage(url, imageView);
}

public void displayImage(String url, WrapImageView imageView, int width, int height) {
Log.i("out", "url====" + url);
mLoaderInstance.displayImage(url, imageView, width, height);
}

public void displayImage(String url, WrapImageView imageView, ImageLoaderListener listener) {
mLoaderInstance.displayImage(url, imageView, listener);
}

public void displayImage(String url, WrapImageView imageView, int width, int height, ImageLoaderListener listener) {
mLoaderInstance.displayImage(url, imageView, width, height, listener);
}

public void downloadImage(Context context, String url, ImageLoaderListener listener) {
mLoaderInstance.downloadImage(context, url, listener);
}

public void onDestroy() {
mLoaderInstance.destroy();
mLoaderInstance = null;
}

public static class Singleton {
final static ImageLoaderManager instance = new ImageLoaderManager();
}
}

0 comments on commit 233f336

Please sign in to comment.