### Load Image with New Chained API (0.0.9+) Source: https://github.com/ladingwu/imageloaderframework/blob/master/README.md Example demonstrating the optimized, chainable API introduced in version 0.0.9 for loading images. It shows how to apply transformations like blur, circle, and placeholder in a single fluent call. ```Java ImageLoader.createImageOptions(img2,url) .blurImage(true) .blurValue(35) .isCircle() .placeholder(R.mipmap.ic_launcher).build().show(); ``` -------------------------------- ### Load Image with Older API (Compatible) Source: https://github.com/ladingwu/imageloaderframework/blob/master/README.md Examples of the older, still compatible API for loading images. It demonstrates loading a rounded image, applying blur and circle transformations, and explicitly specifying the loading framework (e.g., Glide) when both are present. ```Java ImageLoaderOptions op=new ImageLoaderOptions.Builder(img1,url).imageRadiusDp(12).build(); ImageLoaderManager.getInstance().showImage(op); ImageLoaderOptions options=new ImageLoaderOptions.Builder(img2,url) .blurImage(true) // Gaussian blur .blurValue(35) // Gaussian blur intensity .isCircle() // Circle image .placeholder(R.mipmap.ic_launcher)// Placeholder image .build(); ImageLoaderManager.getInstance().showImage(options, LoaderEnum.GLIDE); // Choose to load image via Glide ``` -------------------------------- ### Implement Real-time Image Loading Progress Callback (Old API) Source: https://github.com/ladingwu/imageloaderframework/blob/master/README.md Demonstrates how to attach a real-time progress callback using the older API. The onProgress method provides updates on the image loading progress. ```Java ImageLoaderOptions op=new ImageLoaderOptions.Builder(img1,url).setOnLoaderProgressCallback(new OnLoaderProgressCallback() { @Override public void onProgress(int progress) { Log.w("progress",""+progress); } }).imageRadiusDp(12).build(); ImageLoaderManager.getInstance().showImage(op); ``` -------------------------------- ### Initialize ImageLoaderFramework Source: https://github.com/ladingwu/imageloaderframework/blob/master/README.md Code snippet demonstrating how to initialize the ImageLoaderFramework within the Application class. It shows how to configure the image loader with a specific engine (e.g., Glide) and set memory cache limits. ```Java ImageLoaderConfig config = new ImageLoaderConfig.Builder(LoaderEnum.GLIDE,new GlideImageLocader()) .maxMemory(40*1024*1024L) // Configure memory cache, unit is Byte .build(); ImageLoaderManager.getInstance().init(this,config); ``` -------------------------------- ### Implement Real-time Image Loading Progress Callback (New API) Source: https://github.com/ladingwu/imageloaderframework/blob/master/README.md Demonstrates how to attach a real-time progress callback using the new chainable API (0.0.9+). The onProgress method provides updates on the image loading progress. ```Java ImageLoader.createImageOptions(img1,url).setOnLoaderProgressCallback(new OnLoaderProgressCallback() { @Override public void onProgress(int progress) { Log.w("progress",""+progress); } }).imageRadiusDp(12).build().show(); ``` -------------------------------- ### Add ImageLoaderFramework Dependencies Source: https://github.com/ladingwu/imageloaderframework/blob/master/README.md Instructions for adding the necessary dependencies to a project's build.gradle file. Users can choose either Fresco or Glide as the underlying library, but the 'imageloader-framework' dependency is mandatory. ```Gradle compile 'com.ladingwu.library:fresco:0.0.9' compile 'com.ladingwu.library:glide:0.0.9' compile "com.ladingwu.library:imageloader-framework:0.0.9" ``` -------------------------------- ### ImageLoaderManager Unified API Source: https://github.com/ladingwu/imageloaderframework/blob/master/README.md Defines the core unified image loading interface provided by ImageLoaderManager. This API allows for showing images with various options, with specific implementations for Glide and Fresco. The 'show()' method was added in version 0.0.9. ```APIDOC ImageLoaderManager: showImage(options: ImageLoaderOptions) options: Image loading options, cannot be null show() ``` -------------------------------- ### Image Loading Pause/Resume API Source: https://github.com/ladingwu/imageloaderframework/blob/master/README.md Defines the API for pausing and resuming image loading operations. These methods can be used to optimize resource usage, especially during scrolling. ```APIDOC ImageLoaderManager: pause(context: Context) context: The application context resume(context: Context) context: The application context ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.