Dsiner / Cache

Cache ——Level 3 cache(memory, sdcard, network), abstract asynchronous time-consuming operation for any object, main thread callback, chained call. Get the first frame of the video, audio duration, imageloader, image compress; 3级缓存(内存, 本地, 网络), 针对任意对象,抽象异步耗时操作,主线程回调,链式调用. 获取视频第一帧/缩略图,音频时长, 图片加载,图片压缩等

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cache for Android

License API Readme

Level 3 cache ( memory , local, network ) - Abstract asynchronous time-consuming operation for any object, main thread callback, chained call.

Demo

Screenshot

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.

About

Cache ——Level 3 cache(memory, sdcard, network), abstract asynchronous time-consuming operation for any object, main thread callback, chained call. Get the first frame of the video, audio duration, imageloader, image compress; 3级缓存(内存, 本地, 网络), 针对任意对象,抽象异步耗时操作,主线程回调,链式调用. 获取视频第一帧/缩略图,音频时长, 图片加载,图片压缩等

License:Apache License 2.0