logo_image Sketch Image Loader

Platform Android Arsenal License API QQ Group

English version of the README.md

Sketch 是 Android 上一款强大且全面的图片加载器,除了图片加载的必备功能外,还支持 GIF,手势缩放、分块显示超大图片、自动纠正图片方向、显示视频缩略图等功能

示例 APP

sample_app_download_qrcode

扫描二维码下载或点我下载

特性

支持的特性

支持的 URI

Type Scheme
File in network http://, https://
File in SDCard /, file://
Content Resolver content://
Asset Resource asset://
Drawable Resource drawable://
Base64 data:image/, data:/img/
APK Icon apk.icon://
APP Icon app.icon://
Android Resource android.resource://

详情请参考 URI 类型及使用指南

支持的图片类型

开始使用

导入 Sketch

在 app 的 build.gradle 文件的 dependencies 节点中加入依赖

compile 'me.panpf:sketch:$sketch_version'

请自行替换 $sketch_version 为最新的版本 sketch_version_image

如果需要播放 GIF 就添加 sketch-gif 的依赖

compile 'me.panpf:sketch-gif:$sketch_gif_version'

请自行替换 $sketch_gif_version 为最新的版本 sketch_gif_version_image

Android Studio 会自动合并 AAR 中所包含的权限和混淆配置

使用 SketchImageView 显示图片

SketchImageView sketchImageView = (SketchImageView) findViewById(R.id.image_main);
sketchImageView.displayImage("http://t.cn/RShdS1f");

文档

基础功能:

提升用户体验:

更多:

更新日志

Please view the CHANGELOG.md file

特别感谢

交流群

License

Copyright (C) 2019 Peng fei Pan <[email protected]>

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.