/gigigo-imageLoader-library-android

interface for ImageLoader and implementations with Glide and Picasso

Primary LanguageJavaApache License 2.0Apache-2.0

imageLoader

Build Status

Library wrapper to load images using Glide and Picasso libraries

You can using this library like an Api Fluent. The syntax is equal to Glide library.

Example of use

To load Glide instance

  imageLoader = new GlideImageLoaderImp(this);

To load Picasso instance

imageLoader = new PicassoImageLoaderImp(this);

You can use the library (Picasso or Glide) with the same syntax and don't have to change your code.

imageLoader.load(url)
            .placeholder(R.drawable.ic_loading)
            .error(R.drawable.errorimage)
            .into(imageView);

With callback.

 imageLoader.load(url).into(new ImageLoaderCallback() {
          @Override public void onSuccess(Bitmap bitmap) {
          }
          @Override public void onError(Drawable errorDrawable) {
          }
          @Override public void onLoading() {
          }
        });

You can use also transformations (Glide-Transformations, GPUImage-Transformations).

java
imageLoader.load(url)
            .transform(new GrayscaleTransformation(MainActivity.this))
            .placeholder(R.drawable.ic_loading)
            .error(R.drawable.errorimage)
            .into(imageView);

You can use this library importing the glide or picasso dependency in your build.gradle file

compile 'com.github.gigigo-Android-Devs:gigigo-imageLoader-library-android:imageloader-glide:2.0RC'
compile 'com.github.gigigo-Android-Devs:gigigo-imageLoader-library-android:imageloader-picasso:2.0RC'
compile 'com.github.gigigo-Android-Devs:gigigo-imageLoader-library-android:imageloader-glide-blur:2.0RC'
compile 'com.github.gigigo-Android-Devs:gigigo-imageLoader-library-android:imageloader-glide-transformations:2.0RC'

TODO

License

Copyright 2016 Gigigo.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.