TohidNajafi
چهارشنبه 18 تیر 1393, 23:23 عصر
سلام دوستان
من فایل jar مربوط به ImageDownloader Eror را استفاده کردم بعد از کلی تلاش آخرش یدونه eror حل نشد
لطف کنین راهنمایی کنین
120955
public ImageDownloader(Context context) { cacheDir = StorageUtils.getOwnCacheDirectory(context, directoryName + "/Cache"); // Get singleton instance of ImageLoader imageLoader = ImageLoader.getInstance(); // Create configuration for ImageLoader (all options are optional) config = ( (Object) new ImageLoaderConfiguration.Builder(context)// .memoryCacheExtraOptions((int) ScreenManager.getScreenWidth(), (int) ScreenManager.getScreenHeight())// .discCacheExtraOptions(480, 800, CompressFormat.JPEG, 75) // Can slow ImageLoader, use it carefully (Better don't use it) .threadPoolSize(5) .threadPriority(Thread.MIN_PRIORITY + 2) .denyCacheImageMultipleSizesInMemory()) .offOutOfMemoryHandling()// .memoryCacheSize(4 * 1024 * 1024) .memoryCache(new UsingFreqLimitedMemoryCache(50 * 1024 * 1024))// .memoryCache(new WeakMemoryCache()) .discCache(new UnlimitedDiscCache(cacheDir))// .discCacheFileCount(200) .discCacheFileNameGenerator(new HashCodeFileNameGenerator()) .imageDownloader(new URLConnectionImageDownloader(5 * 1000, 30 * 1000)) // connectTimeout (5 s), readTimeout (30 s) .defaultDisplayImageOptions(DisplayImageOptions.cr eateSimple()) .enableLogging() .build(); // Initialize ImageLoader with created configuration. Do it once. imageLoader.init(config); // Transform matrix// Matrix matrix = new Matrix();// matrix.postSkew(-0.2f, -0.2f); // Creates display image options for custom display task (all options are optional) options = new DisplayImageOptions.Builder()// .showStubImage(R.drawable.icon_loading)// .showImageForEmptyUri(R.drawable.icon_noimage) .cacheInMemory() .cacheOnDisc() .imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_ 2)// .transform(matrix) .build(); }
من فایل jar مربوط به ImageDownloader Eror را استفاده کردم بعد از کلی تلاش آخرش یدونه eror حل نشد
لطف کنین راهنمایی کنین
120955
public ImageDownloader(Context context) { cacheDir = StorageUtils.getOwnCacheDirectory(context, directoryName + "/Cache"); // Get singleton instance of ImageLoader imageLoader = ImageLoader.getInstance(); // Create configuration for ImageLoader (all options are optional) config = ( (Object) new ImageLoaderConfiguration.Builder(context)// .memoryCacheExtraOptions((int) ScreenManager.getScreenWidth(), (int) ScreenManager.getScreenHeight())// .discCacheExtraOptions(480, 800, CompressFormat.JPEG, 75) // Can slow ImageLoader, use it carefully (Better don't use it) .threadPoolSize(5) .threadPriority(Thread.MIN_PRIORITY + 2) .denyCacheImageMultipleSizesInMemory()) .offOutOfMemoryHandling()// .memoryCacheSize(4 * 1024 * 1024) .memoryCache(new UsingFreqLimitedMemoryCache(50 * 1024 * 1024))// .memoryCache(new WeakMemoryCache()) .discCache(new UnlimitedDiscCache(cacheDir))// .discCacheFileCount(200) .discCacheFileNameGenerator(new HashCodeFileNameGenerator()) .imageDownloader(new URLConnectionImageDownloader(5 * 1000, 30 * 1000)) // connectTimeout (5 s), readTimeout (30 s) .defaultDisplayImageOptions(DisplayImageOptions.cr eateSimple()) .enableLogging() .build(); // Initialize ImageLoader with created configuration. Do it once. imageLoader.init(config); // Transform matrix// Matrix matrix = new Matrix();// matrix.postSkew(-0.2f, -0.2f); // Creates display image options for custom display task (all options are optional) options = new DisplayImageOptions.Builder()// .showStubImage(R.drawable.icon_loading)// .showImageForEmptyUri(R.drawable.icon_noimage) .cacheInMemory() .cacheOnDisc() .imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_ 2)// .transform(matrix) .build(); }