Skip to content

Commit

Permalink
androidx-6.0.0发布,新增对Android Q的支持。
Browse files Browse the repository at this point in the history
  • Loading branch information
SherlockGougou committed Mar 24, 2020
1 parent 4a13a35 commit 3859947
Show file tree
Hide file tree
Showing 40 changed files with 192 additions and 194 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### BigImage + ImageView + ViewPager = BigImageViewPager

一个图片浏览器,支持超大图、超长图、支持手势放大、支持查看原图、下载、加载百分比进度显示。采用区块复用加载,优化内存占用,有效避免OOM。支持手势下拉退出。
#### 注意:本框架支持网络图片、本地图片、支持gif动图。
#### 注意:本框架支持网络图片、本地图片、支持gif动图、支持Android Q

# 框架特性
- 支持网络图片、本地图片;
Expand All @@ -19,6 +19,7 @@
- 针对保存图片进行优化,文件扩展名使用文件头部Mime信息进行设置,不用担心gif保存成jpeg;
- 支持自定义查看原图时的百分比View;
- 支持BMP格式的图片;
- 支持Android Q;

# 截图

Expand Down Expand Up @@ -47,8 +48,8 @@ allprojects {
##### 此处显示的是本框架的最新版本号:
##### ⚠️注意:v3版本不再维护,最终版本为v3_4.0.2。建议使用v4、androidx版本。
```
androidx用户 : 使用 androidx-5.0.6
对于glide4.x : 使用 v4_5.0.6
androidx用户 : 使用 androidx-6.0.0
对于glide4.x : 使用 v4_6.0.0
对于glide3.x : 使用 v3_4.0.2
```

Expand All @@ -62,7 +63,7 @@ dependencies {
annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.10.0'
// 查看大图
implementation 'com.github.SherlockGougou:BigImageViewPager:androidx-5.0.6'
implementation 'com.github.SherlockGougou:BigImageViewPager:androidx-6.0.0'
================================分割线==================================
Expand All @@ -73,7 +74,7 @@ dependencies {
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.8.0'
// 查看大图
implementation 'com.github.SherlockGougou:BigImageViewPager:v4_5.0.6'
implementation 'com.github.SherlockGougou:BigImageViewPager:v4_6.0.0'
================================分割线==================================
Expand Down Expand Up @@ -169,7 +170,7 @@ public class MyAppGlideModule extends AppGlideModule {
|setEnableDragClose|设置是否开启下拉图片退出|默认false|
|setEnableUpDragClose|设置是否开启上拉图片退出|默认false|
|setErrorPlaceHolder|设置加载失败的占位图资源id|默认内置R.drawable.load_failed|
|setFolderName|设置下载到的文件夹名称|默认根目录Download(可嵌套多层Download/Image)|
|setFolderName|设置下载到的文件夹名称|默认保存Picture文件夹中|
|setImage|设置单张图片地址|三选一|
|setImageInfoList|设置图片Bean集合|三选一|
|setImageList|设置图片地址集合|三选一|
Expand Down Expand Up @@ -211,9 +212,8 @@ public class MyAppGlideModule extends AppGlideModule {
// 加载策略,默认为手动模式(具体可看下面加载策略的详细说明)
.setLoadStrategy(loadStrategy)
// 保存的文件夹名称,会在SD卡根目录进行文件夹的新建。
// (你也可设置嵌套模式,比如:"BigImageView/Download",会在SD卡根目录新建BigImageView文件夹,并在BigImageView文件夹中新建Download文件夹)
.setFolderName("BigImageView/Download")
// 保存的文件夹名称,会在Picture目录进行文件夹的新建。比如:"BigImageView",会在Picture目录新建BigImageView文件夹)
.setFolderName("BigImageView")
// 缩放动画时长,单位ms
.setZoomTransitionDuration(300)
Expand Down
10 changes: 6 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ buildscript {

repositories {
google()
jcenter()
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/releases/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.0'
classpath 'com.android.tools.build:gradle:3.6.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -16,10 +17,11 @@ buildscript {

allprojects {
repositories {
mavenCentral()
google()
jcenter()
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/releases/' }
maven { url 'https://jitpack.io' }
mavenCentral()
}
}

Expand Down
8 changes: 4 additions & 4 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileSdkVersion 29
buildToolsVersion '29.0.3'
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
targetSdkVersion 29
}

buildTypes {
Expand All @@ -20,7 +20,7 @@ android {
}
}

ext.supportLibVersion = '28.0.0'
ext.supportLibVersion = '29.0.0'

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions library/src/main/java/cc/shinichi/library/ImagePreview.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
* cc.shinichi.library
* create at 2018/5/22 09:06
* description:
Expand All @@ -37,7 +37,7 @@ public class ImagePreview {
private WeakReference<Context> contextWeakReference;
private List<ImageInfo> imageInfoList;// 图片数据集合
private int index = 0;// 默认显示第几个
private String folderName = "Download";// 下载到的文件夹名(根目录中)
private String folderName = "";// 下载到的文件夹名(根目录中)
private float minScale = 1.0f;// 最小缩放倍数
private float mediumScale = 3.0f;// 中等缩放倍数
private float maxScale = 5.0f;// 最大缩放倍数
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
* 图片信息
*/
public class ImageInfo implements Serializable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
* cc.shinichi.library.glide
* create at 2018/11/2 17:12
* description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
* cc.shinichi.library.glide
* create at 2018/5/21 15:22
* description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
* cc.shinichi.library.glide.progress
* create at 2018/11/2 15:55
* description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
* com.fan16.cn.loader.glide
* create at 2018/5/10 11:12
* description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
* com.fan16.cn.loader.glide
* create at 2018/5/10 11:11
* description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
*/
public interface OnProgressListener {
void onProgress(String url, boolean isComplete, int percentage, long bytesRead, long totalBytes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
*/
@GlideModule
public class ProgressLibraryGlideModule extends LibraryGlideModule {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
*/
public class ProgressManager {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
*/
public class ProgressResponseBody extends ResponseBody {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
*/
public class NetworkUtil {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
*/
public class Print {
public static void d(String TAG, String msg) {
Expand Down
30 changes: 0 additions & 30 deletions library/src/main/java/cc/shinichi/library/tool/device/SDKUtil.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
*/
public final class FileUtil {

Expand Down Expand Up @@ -1874,7 +1874,7 @@ private static boolean isSpace(final String s) {
/**
* 调用系统软件打开文件, 会自动判断文件类型
*
* @author 工藤一号 gougou@16fan.com
* @author 工藤一号 18883840501@163.com
* @date 2017年6月8日 上午10:46:50
*/
public static void openFileBySystemApp(Context context, File file) {
Expand All @@ -1894,7 +1894,7 @@ public static void openFileBySystemApp(Context context, File file) {
/**
* 得到文件类型
*
* @author 工藤一号 gougou@16fan.com
* @author 工藤一号 18883840501@163.com
* @date 2017年6月8日 上午10:48:30
*/
public static String getMIMEType(File file) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* @author 工藤
* @email gougou@16fan.com
* @email 18883840501@163.com
* com.fan16.cn.util
* create at 2018/5/4 16:50
* description:媒体扫描
Expand Down
Loading

0 comments on commit 3859947

Please sign in to comment.