dev
This commit is contained in:
@@ -8,18 +8,28 @@ import androidx.annotation.Keep;
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
* <p>
|
||||
* 图片下载接口
|
||||
* 图片加载接口
|
||||
*/
|
||||
@Keep
|
||||
public interface IMogoImageLoaderListener {
|
||||
|
||||
/**
|
||||
* 开始加载
|
||||
*/
|
||||
@Keep
|
||||
void onStart();
|
||||
|
||||
// void onProcess( int completedSize, int totalSize );
|
||||
|
||||
/**
|
||||
* 加载完成
|
||||
*/
|
||||
@Keep
|
||||
void onCompleted( Bitmap bitmap );
|
||||
|
||||
/**
|
||||
* 加载失败
|
||||
*/
|
||||
@Keep
|
||||
void onFailure( Exception e );
|
||||
}
|
||||
@@ -10,29 +10,66 @@ import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
* @author congtaowang
|
||||
* @since 2019-12-23
|
||||
* <p>
|
||||
* 图片接口
|
||||
* 图片接口,使用
|
||||
*/
|
||||
@Keep
|
||||
public interface IMogoImageloader extends IProvider {
|
||||
|
||||
@Keep
|
||||
void init( Context context );
|
||||
|
||||
/**
|
||||
* 加载图片
|
||||
*
|
||||
* @param url 图片地址
|
||||
* @param imageView 特定的图片控件
|
||||
*/
|
||||
@Keep
|
||||
void displayImage( String url, MogoImageView imageView );
|
||||
|
||||
/**
|
||||
* 加载图片
|
||||
*
|
||||
* @param url 图片地址
|
||||
* @param imageView 图片控件
|
||||
* @param width 图片宽度
|
||||
* @param height 图片高度
|
||||
*/
|
||||
@Keep
|
||||
void displayImage( String url, MogoImageView imageView, int width, int height );
|
||||
|
||||
/**
|
||||
* 加载图片
|
||||
*
|
||||
* @param url 图片地址
|
||||
* @param imageView 图片控件
|
||||
* @param width 图片宽度
|
||||
* @param height 图片高度
|
||||
* @param listener 加载回调
|
||||
*/
|
||||
@Keep
|
||||
void displayImage( String url, MogoImageView imageView, int width, int height, final IMogoImageLoaderListener listener );
|
||||
|
||||
/**
|
||||
* 加载图片
|
||||
*
|
||||
* @param url 图片地址
|
||||
* @param imageView 图片控件
|
||||
* @param listener 加载回调
|
||||
*/
|
||||
@Keep
|
||||
void displayImage( String url, MogoImageView imageView, final IMogoImageLoaderListener listener );
|
||||
|
||||
/**
|
||||
* 下载图片
|
||||
*
|
||||
* @param context
|
||||
* @param url 图片地址
|
||||
* @param listener 下载回调
|
||||
*/
|
||||
@Keep
|
||||
void downloadImage( Context context, String url, IMogoImageLoaderListener listener );
|
||||
|
||||
/**
|
||||
* 请勿调用
|
||||
*/
|
||||
@Keep
|
||||
void destroy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user