Universal Image Loaderの作成者とまったく同じこの男が提案することを正確に行いますが、それでもこのエラーが発生します。
URI = assets://NMF0002_007.jpg
resolveUri failed on bad bitmap uri: NMF0002_007.jpg
画像が確実に認識されるようにするには、何を確認すればよいですか?
私はこのように使用します:
//get the file name
String fileName = cursor.getString(cursor.getColumnIndexOrThrow(DatabaseHelper.FIELD_RESOURCE));
String imageUri = "assets://";
Log.d(TAG, "URI = " + imageUri + fileName);
ImageLoader.getInstance().displayImage(imageUri+fileName, holder.iv_details_resource);
これは私の構成です:
//Get the imageloader.
ImageLoader imageLoader = ImageLoader.getInstance();
//Create image options.
DisplayImageOptions options = new DisplayImageOptions.Builder()
.cacheOnDisc()
.imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2)
.bitmapConfig(Bitmap.Config.RGB_565)
.build();
//Create a config with those options.
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext())
.defaultDisplayImageOptions(options)
.discCacheExtraOptions(480, 800, CompressFormat.JPEG, 75)
.build();
//Initialise the imageloader.
imageLoader.init(config);
私は何が間違っているか、欠けていますか?