Description
Hi, I use the glide to load my image in my ImageView, but there seem have a problem. On my Moto G phone, the image have a background color, but this image's background color is white. but on my Moto X phone, the image display is right.
this image url is http://img.haihu.com/011507220950be96d52f459aa3a903ef6686a402.jpg@1c_1e_250w.jpg
you can see this picture, it's MOTO G display, I had mark the problem place, this glide load this picture has a background color, but the fact is this picture isn't this color background. image url in the above
and this is the MOTO X display, it look like right:
and screen is this:
MOTO G
MOTO X
By the way, Most pictures have this problem, and this problem occurs in other Chinese phones
Our application will be released soon, can you help me solve this problem it? Very thank you.
and this is my glide config:
compile 'com.github.bumptech.glide:glide:3.6.0'
public class HaiTaoGlideModule implements GlideModule {
@Override
public void applyOptions(Context context, GlideBuilder glideBuilder) {
//TODO 配置 Glide 的行为
glideBuilder.setDiskCache(new DiskCache.Factory() {
@Override
public DiskCache build() {
// Careful: the external cache directory doesn't enforce permissions
String path = PathUtil.getImagesCachePath();
File fileDir = new File(path);
if (!fileDir.exists()) {
fileDir.mkdirs();
}
return DiskLruCacheWrapper.get(fileDir, 200 * 1024 * 1024); // /haitao/images/cache 200M
}
});
}
@Override
public void registerComponents(Context context, Glide glide) {
}
}