FlowImageLoader is another Asynchronous-Image-Loader framework, friendly to developer, and every thing is intuitive and under your control.
- Fluent & Controllable syntax
- Asynchronize loading & handle in UI-thread no matter what thread you are in
- Lifecycle awared (better adapted to
RecyclerView / RxActivity / RxFragment
) - Reusable for same url request of short time
- Faster decode & Space-Saving for cache
- Easy extensible
- Better Transition Animations
compile 'com.walfud:flowimageloader:2.0.0'
FlowImageLoader.with(getApplicationContext())
.load(Uri.parse("https://raw.githubusercontent.com/walfud/flowimageloader/master/doc/rose.png"))
.cache()
.into(imageView)
.pls();
FlowImageLoader.with(getApplicationContext())
.load(Uri.parse("https://raw.githubusercontent.com/walfud/flowimageloader/master/doc/rose.png"))
.resize(200, 100)
.round(3, 3)
.cache()
.into(imageView)
.pls();
All transformations are made in sequence you call them.
There are some 'flowers' makes your work easy. The 'flower' is an wrapper of FlowImageLoader
, which aimed to meet the most common use. Usually, the 'flowers' does the following:
- Load image from url.
- Transform image to fit the
ImageView
. (If widget can't get bound, 'flowers' will try it later. Timeout is 2 seconds) - Set the transformed image to widget.
- Cache the transformed image in order to future use.
So... It's very convenient to load network image to an ImageView
with just one line code!
See the magic below.
Rose
is rectangle with rounded.
new Rose(imageView).open(url);
Sunflower
is circled one.
new Sunflower(imageView).open(url);