Awesome
Cache for Android
Level 3 cache (
memory
,local
,network
) - Abstract asynchronous time-consuming operation for any object, main thread callback, chained call.
Demo
<p> <img src="https://github.com/Dsiner/Resouce/blob/master/lib/Cache/cache.png" width="320" alt="Screenshot"/> </p>Implementation list
-
FrameCache
- Get the first frame and duration of local or network video. -
DurationCache
- Get local or network audio duration. -
ImageCache
- Get local or network image. -
CompressCache
- Image compress.
Usage
FrameCache.with(context).load(url).placeholder(R.color.colorAccent).into(view);
DurationCache.with(context).load(url).placeholder(0L).into(view);
ImageCache.with(context).load(url).into(imageView);
CompressCache.with(context).load(url).into(imageView);
...
More usage see Demo
Licence
Copyright 2017 D
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.