/**
* From Assets
*
* @param imageUri
* @param imageView
* @throws java.io.IOException
*/
protected void displayImageFromAssets(String imageUri, ImageView imageView) throws IOException {
String filePath = Scheme.ASSETS.crop(imageUri);
Bitmap bitmap;
try {
bitmap = BitmapFactory.decodeStream(context.getAssets().open(filePath));
} catch (IOException e) {
e.printStackTrace();
return;
}
if (imageView != null) {
// imageView.setImageBitmap(bitmap);
Glide.with(context).load(inputStreamToByte(context.getAssets().open(filePath))).into(imageView);
// Log.i("杭鹏伟", " " + imageUri + " " + filePath);
}
}
ImageLoader.java 文件源码
java
阅读 41
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录