Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codekidx/lazy-loader
https://github.com/codekidx/lazy-loader
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/codekidx/lazy-loader
- Owner: codekidX
- Created: 2016-01-12T14:09:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-12T14:33:01.000Z (about 9 years ago)
- Last Synced: 2025-01-09T17:39:05.566Z (6 days ago)
- Language: Java
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lazy Loader
This library is based on https://github.com/thest1/LazyList.git. Credits to thest1 for an awesome base.
## Usage
#### 1. Add it in your root build.gradle at the end of repositories
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
#### 2. Add the dependencydependencies {
compile 'com.github.User:Repo:Tag'
}
## Guide#### ImageLoaderLocal
This class is used to load image from a specific path from the phone's storage
ImageLoaderLocal imageLoaderLocal = new ImageLoaderLocal();
//Inside List's getView
imageLoaderLocal.DisplayImage(String path, ImageView imageView, int id); //here 'id' is the default image from your resources | if null it will show default gradient#### ImageLoaderRemote
This class is used to load image from a specific path from the phone's storage
ImageLoaderRemote imageLoaderRemote = new ImageLoaderRemote();
//Inside List's getView | same as thest1's code
imageLoaderRemote.DisplayImage(String url, ImageView imageView);
#### ImageDecoderThis class is used to get bitmap from decoded file. Example when you use Bitmap.decodeFile method.
ImageDecoder imageDecoder = new ImageDecoder();
//Inside List's getView | same as thest1's code
imageDecoder.DisplayImage(String path, ImageView imageView, int id); //here 'id' is the default image from your resources | if null it will show default gradient