Commit 75af33f3 by 郑娜伟

picture 去掉 centerCrop() 发布1.1.3 版本

parent 1f22956e
......@@ -39,9 +39,9 @@ dependencies {
// api 'com.sobot.library:sobotcommon:1.0'
// api 'com.sobot.library:sobotcommon_x:1.0'
// implementation 'com.github.bumptech.glide:glide:4.9.0'
// implementation 'com.sobot.chat:sobotsupport-glidev4:2.1'
implementation 'com.facebook.fresco:fresco:1.13.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.sobot.chat:sobotsupport-glidev4:2.3'
// implementation 'com.facebook.fresco:fresco:1.13.0'
//android x 可以用这个 ,普通版不能用这个
// implementation 'com.facebook.fresco:fresco:2.6.0'
implementation 'com.squareup.okhttp3:okhttp:4.4.0'
......
......@@ -3,7 +3,7 @@ package com.sobot.moduletest;
import android.app.Application;
import android.support.multidex.MultiDex;
import com.facebook.drawee.backends.pipeline.Fresco;
//import com.facebook.drawee.backends.pipeline.Fresco;
import com.sobot.common.ui.SobotMarkConfig;
import com.sobot.common.utils.SobotCommonApi;
......@@ -17,7 +17,7 @@ public class MyApp extends Application {
@Override
public void onCreate() {
super.onCreate();
Fresco.initialize(this);
// Fresco.initialize(this);
// 主要是添加下面这句代码
MultiDex.install(this);
SobotCommonApi.init(this,"https://sobot.com");
......
......@@ -20,12 +20,12 @@ dependencies {
// api project(':sobot_gson')
api 'com.sobot.library:utils:1.1.1'
api 'com.sobot.library:picture:1.1.2'
api 'com.sobot.library:picture:1.1.3'
api 'com.sobot.library:net:1.1.1'
api 'com.sobot.library:gson:1.1.1'
// api 'com.sobot.library:utils:1.1.1'
// api 'com.sobot.library:picture_x:1.1.2'
// api 'com.sobot.library:picture_x:1.1.3'
// api 'com.sobot.library:net:1.1.1'
// api 'com.sobot.library:gson:1.1.1'
}
......
......@@ -13,7 +13,7 @@ ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'sobotcommon' //项目名
// PUBLISH_ARTIFACT_ID = 'sobotcommon_x' //项目名
PUBLISH_VERSION = '1.1.8' //版本号
PUBLISH_VERSION = '1.2' //版本号
}
......
......@@ -32,7 +32,7 @@ dependencies {
compileOnly 'com.github.bumptech.glide:glide:3.8.0'
compileOnly 'com.squareup.picasso:picasso:2.5.2'
compileOnly 'com.facebook.fresco:fresco:2.6.0'
api 'com.sobot.chat:sobotsupport-glidev4:2.0'
api 'com.sobot.chat:sobotsupport-glidev4:2.2'
}
//添加发布到mavenCentral脚本
......
......@@ -13,7 +13,7 @@ ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'picture' //项目名
//PUBLISH_ARTIFACT_ID = 'picture_x' //项目名
PUBLISH_VERSION = '1.1.2' //版本号
PUBLISH_VERSION = '1.1.3' //版本号
}
......
......@@ -18,7 +18,7 @@ public class SobotGlideImageLoader extends SobotImageLoader {
@Override
public void displayImage(Context context, final ImageView imageView, final String path, @DrawableRes int loadingResId, @DrawableRes int failResId, int width, int height, final SobotDisplayImageListener listener) {
BitmapRequestBuilder<String, Bitmap> builder = Glide.with(context).load(path).asBitmap().placeholder(loadingResId).error(failResId).centerCrop();
BitmapRequestBuilder<String, Bitmap> builder = Glide.with(context).load(path).asBitmap().placeholder(loadingResId).error(failResId);
if (width != 0 || height != 0) {
builder.override(width, height);
}
......@@ -40,7 +40,7 @@ public class SobotGlideImageLoader extends SobotImageLoader {
@Override
public void displayImage(Context context, final ImageView imageView, @DrawableRes int targetResId, @DrawableRes int loadingResId, @DrawableRes int failResId, int width, int height, final SobotDisplayImageListener listener) {
BitmapRequestBuilder<Integer, Bitmap> builder = Glide.with(context).load(targetResId).asBitmap().placeholder(loadingResId).error(failResId).centerCrop();
BitmapRequestBuilder<Integer, Bitmap> builder = Glide.with(context).load(targetResId).asBitmap().placeholder(loadingResId).error(failResId);
if (width != 0 || height != 0) {
builder.override(width, height);
}
......
......@@ -30,9 +30,9 @@ public class SobotPicassoImageLoader extends SobotImageLoader {
}
creator.config(Bitmap.Config.RGB_565);
if (width != 0 || height != 0) {
creator.resize(width, height).centerCrop();
creator.resize(width, height);
} else {
creator.fit().centerCrop();
creator.fit();
}
creator.into(imageView, new Callback.EmptyCallback() {
@Override
......@@ -54,9 +54,9 @@ public class SobotPicassoImageLoader extends SobotImageLoader {
creator.error(failResId);
}
if (width != 0 || height != 0) {
creator.resize(width, height).centerCrop();
creator.resize(width, height);
} else {
creator.fit().centerCrop();
creator.fit();
}
creator.into(imageView, new Callback.EmptyCallback() {
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment