All Projects → ladingwu → Imageloaderframework

ladingwu / Imageloaderframework

打造统一的图片加载框架,融合Glide(4.x),Fresco,不侵入业务代码,一套API兼容两种加载库

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Imageloaderframework

Transformers
An Android transformation library providing a variety of image transformations for Coil, Glide, Picasso, and Fresco.
Stars: ✭ 167 (-60.43%)
Mutual labels:  glide, fresco
Scrollgalleryview
🌉 Android image gallery with bottom scroll view
Stars: ✭ 481 (+13.98%)
Mutual labels:  glide, fresco
Imageloader
a wrapper for fresco,glidev3,v4, a solution for image load and big image preview, and provide debug tool for imageview
Stars: ✭ 224 (-46.92%)
Mutual labels:  glide, fresco
Gallery
图片缩放以及相册的实现
Stars: ✭ 24 (-94.31%)
Mutual labels:  glide, fresco
BaseDevelop
an android project for now fashion open source framework
Stars: ✭ 24 (-94.31%)
Mutual labels:  glide, fresco
CarouselGifViewer
Efficiently display a list of GIFs in a carousel (RecyclerView).
Stars: ✭ 33 (-92.18%)
Mutual labels:  glide
Frescoutils
Fresco 的封装,快速上手,图像后处理,超大图高清预览,缩小放大,双击放大等一一俱全。简书 http://www.jianshu.com/p/cd058a924288
Stars: ✭ 345 (-18.25%)
Mutual labels:  fresco
GitHubApplication
GitHubApplication 📱 is an Android application built to demonstrate the use of modern Android development tools - (Kotlin, Coroutines, Hilt, LiveData, View binding, Data Store, Architecture components, MVVM, Room, Retrofit, Navigation).
Stars: ✭ 11 (-97.39%)
Mutual labels:  glide
Dowy
🎬Application that displays a list of Movies and Tv Series using Modern Android Application Development tools and API's
Stars: ✭ 29 (-93.13%)
Mutual labels:  glide
Wanandroid
🏄 基于Architecture Components dependencies (Lifecycles,LiveData,ViewModel,Room)构建的WanAndroid开源项目。 你值得拥有的MVVM快速开发框架:https://github.com/jenly1314/MVVMFrame
Stars: ✭ 410 (-2.84%)
Mutual labels:  glide
Picassopalette
Android Lollipop Palette is now easy to use with Picasso !
Stars: ✭ 366 (-13.27%)
Mutual labels:  glide
Jetpack github
基于Kotlin + Jetpack全家桶 + Coroutines(协程) + Flutter等架构实现的一款精简版Github客户端项目,望与广大小伙伴一起成长,欢迎start or fork!
Stars: ✭ 314 (-25.59%)
Mutual labels:  glide
BakingApp
🍛🍴 This app allows a user to select a recipe and see video-guided steps for how to complete it, showcasing MVVM, Retrofit, ExoPlayer with lifecycle components, Master/Detail Flow, Widgets.
Stars: ✭ 18 (-95.73%)
Mutual labels:  glide
Glidefacedetectiontransformation
A memory efficient Android image transformation library providing cropping above Face Detection (Face Centering) for Glide.
Stars: ✭ 348 (-17.54%)
Mutual labels:  glide
RickAndMorty-AndroidMVVMSample
An android sample project using Jetpack libraries and MVVM design pattern
Stars: ✭ 17 (-95.97%)
Mutual labels:  glide
Mvvmsmart
基于谷歌最新AAC架构,MVVM设计模式的一套快速开发库,整合ViewModel+Lifecycles+Navigation+DataBinding+LiveData+Okhttp+Retrofit+RxJava+Glide等主流模块,满足日常开发需求。使用该框架可以快速开发高质量、易维护的Android应用。 项目组会持续维护,请放心使用.欢迎Start并Fork交流.
Stars: ✭ 382 (-9.48%)
Mutual labels:  glide
catchflicks
🎬 Kitchen sink project for learning android concepts 🎬
Stars: ✭ 12 (-97.16%)
Mutual labels:  glide
Spedittool
An efficient and scalable library for inputing and displaying gif or @mention on graph-text mixed TextView/EditText
Stars: ✭ 292 (-30.81%)
Mutual labels:  glide
Androidproject
Android 技术中台,但愿人长久,搬砖不再有
Stars: ✭ 4,398 (+942.18%)
Mutual labels:  glide
Landscapist
🍂 Jetpack Compose image loading library which can fetch and display network images using Glide, Coil, and Fresco.
Stars: ✭ 264 (-37.44%)
Mutual labels:  fresco

ImageLoaderFramework

  • 打造统一的图片加载框架,融合Glide,Fresco,一套API兼容两种加载方式

  • 两个底层包Glide,Fresco可随时相互替换,而无需大幅修改业务代码

  • 图片加载模块作为手机常用的一个重要模块,我们需要保证对它有完全的控制力,以适应产品随时变化的需求,因此我们就需要整合自己的图片加载框架,将它和业务代码分离,不过分依赖哪一个包,保证必要时可以替换。

  • 具体如何打造统一加载框架请参考这两篇文章《封装并实现统一的图片加载架构》,《项目重构之路——Fresco非入侵式替换Glide

  • 使用方式:

    // 下面两个依赖包可选,根据需求二选一即可,
    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"
    
  • 初始化
        // 初始化代码需要在Application中完成。
        ImageLoaderConfig config = new ImageLoaderConfig.Builder(LoaderEnum.GLIDE,new GlideImageLocader())
                .maxMemory(40*1024*1024L)  // 配置内存缓存,单位为Byte
                .build();
        ImageLoaderManager.getInstance().init(this,config);
        
  • 图片加载统一调用接口
    //该接口的具体实现Glide和Fresco各有不同
    showImage(@NonNull ImageLoaderOptions options);

    show()  // 0.0.9版本之后新增的API
  • 使用范例:

0.0.9之后优化了调用方式 ,可一步完成图片加载(对老的API是兼容的):

        ImageLoader.createImageOptions(img2,url)
                .blurImage(true)
                .blurValue(35)
                .isCircle()
                .placeholder(R.mipmap.ic_launcher).build().show();


之前的API调用方式(新版本仍然可以用):

       // 加载圆角图片
   ImageLoaderOptions op=new ImageLoaderOptions.Builder(img1,url).imageRadiusDp(12).build();
   ImageLoaderManager.getInstance().showImage(op);
                
                
   ImageLoaderOptions options=new ImageLoaderOptions.Builder(img2,url)
                                                    .blurImage(true)   // 高斯模糊    
                                                    .blurValue(35)   //高斯模糊程度
                                                    .isCircle()   // 圆图  
                                                     .placeholder(R.mipmap.ic_launcher)// 占位图
                                                     .build(); 
                                                                  
        // 如果项目同时使用了Fresco和Glide,可以指定特定的加载框架加载图片                                      
  ImageLoaderManager.getInstance().showImage(options, LoaderEnum.GLIDE);  // 选择通过Glide加载图片
                 
                 

2018-11-28 更新

  • 优化了图片加载的调用方式,通过链式API一气呵成
  • 增加了图片加载的实时加载进度回调(该功能还没经过非常详细的测试)

实时加载进度回调:

      
      // 0.0.9之后增加的新的API调用方式
     ImageLoader.createImageOptions(img1,url).setOnLoaderProgressCallback(new OnLoaderProgressCallback() {
                        @Override
                        public void onProgress(int progress) {
                            Log.w("progress",""+progress);
                        }
                    }).imageRadiusDp(12).build().show();

// 老的API调用方式
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);


2018-03-04 更新

  • 添加了对Fresco内存缓存的配置功能(Glide暂时采用默认配置)。

2018-02-01 更新

  • 添加了对于Glide4.x版本的支持
  • 添加了圆图,圆角,高斯模糊的支持,并且保证Glide和Fresco的效果大体相同

2017-8-12 更新

  • 添加图片暂停加载和恢复功能,方便优化处理
    // 暂停加载
    void pause(Context context);
    // 恢复加载
    void resume(Context context);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].