You can using this library like an Api Fluent. The syntax is equal to Glide library.
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'
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.