Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lify
RvApp
Commits
1f0788ff
Commit
1f0788ff
authored
Jun 07, 2019
by
lify
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化Glide,使用3.7.0版本。
parent
6c1c0633
Changes
32
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
96 additions
and
1359 deletions
+96
-1359
build.gradle
MyFrame/build.gradle
+6
-5
ActivityImageBrowseInt.java
...in/java/com/frame/base/browse/ActivityImageBrowseInt.java
+1
-1
ActivityImageBrowseUrl.java
...in/java/com/frame/base/browse/ActivityImageBrowseUrl.java
+1
-1
FragmentImageBrowse.java
.../main/java/com/frame/base/browse/FragmentImageBrowse.java
+3
-2
GlideManager.java
MyFrame/src/main/java/com/frame/base/glide/GlideManager.java
+48
-0
build.gradle
OkGo/build.gradle
+3
-1
glide_icon_error.png
Resource/src/main/res/mipmap-xxhdpi/glide_icon_error.png
+0
-0
glide_icon_placeholder.png
...rce/src/main/res/mipmap-xxhdpi/glide_icon_placeholder.png
+0
-0
build.gradle
RvFrame/build.gradle
+5
-5
base_tab_layout.xml
RvFrame/src/main/res/layout/base_tab_layout.xml
+15
-15
ConfirmOrderActivity.java
.../rv/home/rv/module/ui/main/home/ConfirmOrderActivity.java
+1
-1
DrivingUploadActivity.java
...rv/home/rv/module/ui/main/home/DrivingUploadActivity.java
+1
-1
ShareImageActivity.java
...om/rv/home/rv/module/ui/main/home/ShareImageActivity.java
+1
-4
build.gradle
RvWrapper/build.gradle
+3
-23
OkHttpCreate.java
...rc/main/java/com/ruiwenliu/wrapper/http/OkHttpCreate.java
+0
-1
ProgressInterceptor.java
.../java/com/ruiwenliu/wrapper/http/ProgressInterceptor.java
+0
-38
ProgressListener.java
...ain/java/com/ruiwenliu/wrapper/http/ProgressListener.java
+0
-16
ProgressResponseBody.java
...java/com/ruiwenliu/wrapper/http/ProgressResponseBody.java
+0
-84
BaseGlideHolder.java
...main/java/com/ruiwenliu/wrapper/util/BaseGlideHolder.java
+6
-63
GlideCache.java
...ain/java/com/ruiwenliu/wrapper/util/glide/GlideCache.java
+0
-61
GlideCacheUtil.java
...java/com/ruiwenliu/wrapper/util/glide/GlideCacheUtil.java
+0
-189
GlideManager.java
...n/java/com/ruiwenliu/wrapper/util/glide/GlideManager.java
+0
-225
tab_chat_normal_nor.png
...apper/src/main/res/drawable-xhdpi/tab_chat_normal_nor.png
+0
-0
build.gradle
Utils/build.gradle
+1
-7
GlideCache.java
...c/main/java/com/base/utils/ui/image/glide/GlideCache.java
+0
-49
GlideCacheUtil.java
...in/java/com/base/utils/ui/image/glide/GlideCacheUtil.java
+0
-189
GlideManager.java
...main/java/com/base/utils/ui/image/glide/GlideManager.java
+0
-224
ProgressInterceptor.java
...va/com/base/utils/ui/image/glide/ProgressInterceptor.java
+0
-38
ProgressListener.java
.../java/com/base/utils/ui/image/glide/ProgressListener.java
+0
-16
ProgressResponseBody.java
...a/com/base/utils/ui/image/glide/ProgressResponseBody.java
+0
-84
build.gradle
build.gradle
+1
-1
settings.gradle
settings.gradle
+0
-15
No files found.
MyFrame/build.gradle
View file @
1f0788ff
...
@@ -37,12 +37,13 @@ dependencies {
...
@@ -37,12 +37,13 @@ dependencies {
androidTestImplementation
(
'com.android.support.test.espresso:espresso-core:2.2.2'
,
{
androidTestImplementation
(
'com.android.support.test.espresso:espresso-core:2.2.2'
,
{
exclude
group:
'com.android.support'
,
module:
'support-annotations'
exclude
group:
'com.android.support'
,
module:
'support-annotations'
})
})
api
project
(
path:
':OkGo'
)
api
project
(
path:
':Utils'
)
api
project
(
path:
':Utils'
)
//鲁班图片压缩 https://github.com/Curzibn/Luban
//鲁班图片压缩 https://github.com/Curzibn/Luban
api
'top.zibin:Luban:1.1.8'
api
'top.zibin:Luban:1.1.8'
//权限申请 https://github.com/googlesamples/easypermissions
api
'pub.devrel:easypermissions:2.0.0'
api
'pub.devrel:easypermissions:2.0.0'
//
官方https://github.com/jeasonlzy/okhttp-OkGo
//
Glide
api
'com.lzy.net:okgo:3.0.4'
api
"com.github.bumptech.glide:glide:$rootProject.ext.glideVersion"
//annotationProcessor "com.github.bumptech.glide:glide:$rootProject.ext.glideVersion"
}
}
Utils/src/main/java/com/base/utils/ui/image/pinch
/ActivityImageBrowseInt.java
→
MyFrame/src/main/java/com/frame/base/browse
/ActivityImageBrowseInt.java
View file @
1f0788ff
package
com
.
base
.
utils
.
ui
.
image
.
pinch
;
package
com
.
frame
.
base
.
browse
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.NonNull
;
...
...
Utils/src/main/java/com/base/utils/ui/image/pinch
/ActivityImageBrowseUrl.java
→
MyFrame/src/main/java/com/frame/base/browse
/ActivityImageBrowseUrl.java
View file @
1f0788ff
package
com
.
base
.
utils
.
ui
.
image
.
pinch
;
package
com
.
frame
.
base
.
browse
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.NonNull
;
...
...
Utils/src/main/java/com/base/utils/ui/image/pinch
/FragmentImageBrowse.java
→
MyFrame/src/main/java/com/frame/base/browse
/FragmentImageBrowse.java
View file @
1f0788ff
package
com
.
base
.
utils
.
ui
.
image
.
pinch
;
package
com
.
frame
.
base
.
browse
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.annotation.IntegerRes
;
import
android.support.annotation.IntegerRes
;
...
@@ -10,7 +10,8 @@ import android.view.ViewGroup;
...
@@ -10,7 +10,8 @@ import android.view.ViewGroup;
import
com.base.utils.R
;
import
com.base.utils.R
;
import
com.base.utils.base.BaseFragment
;
import
com.base.utils.base.BaseFragment
;
import
com.base.utils.ui.image.glide.GlideManager
;
import
com.base.utils.ui.image.pinch.PinchImageView
;
import
com.frame.base.glide.GlideManager
;
import
java.util.Objects
;
import
java.util.Objects
;
...
...
MyFrame/src/main/java/com/frame/base/glide/GlideManager.java
0 → 100644
View file @
1f0788ff
package
com
.
frame
.
base
.
glide
;
import
android.content.Context
;
import
android.widget.ImageView
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.load.engine.DiskCacheStrategy
;
/**
* Created by yuyife
* glide加载图片
*/
public
class
GlideManager
{
private
Context
mContext
;
public
GlideManager
(
Context
context
)
{
this
.
mContext
=
context
.
getApplicationContext
();
}
private
static
GlideManager
glideManager
;
public
static
GlideManager
getInstance
(
Context
context
)
{
if
(
glideManager
==
null
)
{
glideManager
=
new
GlideManager
(
context
);
}
return
glideManager
;
}
/**
* 加载普通图片
*
* @param path
* @param image
*/
public
void
loadImage
(
Object
path
,
ImageView
image
)
{
Glide
.
with
(
mContext
)
.
load
(
path
)
.
placeholder
(
com
.
base
.
resource
.
R
.
mipmap
.
glide_icon_placeholder
)
.
error
(
com
.
base
.
resource
.
R
.
mipmap
.
glide_icon_error
)
.
skipMemoryCache
(
true
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
)
.
into
(
image
);
}
}
OkGo/build.gradle
View file @
1f0788ff
...
@@ -38,9 +38,11 @@ dependencies {
...
@@ -38,9 +38,11 @@ dependencies {
//api 'com.squareup.retrofit2:converter-gson:2.1.0'
//api 'com.squareup.retrofit2:converter-gson:2.1.0'
api
"com.google.code.gson:gson:$rootProject.ext.gsonVersion"
api
"com.google.code.gson:gson:$rootProject.ext.gsonVersion"
//必须使用 github项目:https://github.com/jeasonlzy/okhttp-OkGo
//必须使用 github项目:https://github.com/jeasonlzy/okhttp-OkGo
其包含 okhttp 3.8.1
api
'com.lzy.net:okgo:3.0.4'
api
'com.lzy.net:okgo:3.0.4'
//以下三个选择添加,okrx和okrx2不能同时使用
//以下三个选择添加,okrx和okrx2不能同时使用
// api 'com.lzy.net:okrx:1.0.2'
// api 'com.lzy.net:okrx:1.0.2'
// api 'com.lzy.net:okrx2:2.0.2'
// api 'com.lzy.net:okrx2:2.0.2'
...
...
Resource/src/main/res/mipmap-xxhdpi/glide_icon_error.png
0 → 100644
View file @
1f0788ff
3.74 KB
Resource/src/main/res/mipmap-xxhdpi/glide_icon_placeholder.png
0 → 100644
View file @
1f0788ff
2.89 KB
RvFrame/build.gradle
View file @
1f0788ff
apply
plugin:
'com.android.library'
apply
plugin:
'com.android.library'
android
{
android
{
compileSdkVersion
rootProject
.
ext
.
compileSdkVersion
compileSdkVersion
rootProject
.
ext
.
compileSdkVersion
buildToolsVersion
rootProject
.
ext
.
buildToolsVersion
buildToolsVersion
rootProject
.
ext
.
buildToolsVersion
...
@@ -47,10 +46,11 @@ android {
...
@@ -47,10 +46,11 @@ android {
api
"com.android.support:recyclerview-v7:$rootProject.ext.supportVersion"
api
"com.android.support:recyclerview-v7:$rootProject.ext.supportVersion"
api
"com.android.support:cardview-v7:$rootProject.ext.supportVersion"
api
"com.android.support:cardview-v7:$rootProject.ext.supportVersion"
api
'com.android.support.constraint:constraint-layout:1.1.3'
api
'com.android.support.constraint:constraint-layout:1.1.3'
api
project
(
path:
':MyFrame'
)
api
project
(
path:
':OkGo'
)
api
'com.jakewharton:butterknife:8.8.1'
api
project
(
path:
':MyFrame'
)
annotationProcessor
'com.jakewharton:butterknife-compiler:8.8.1'
//适配器
api
"com.github.CymChad:BaseRecyclerViewAdapterHelper:$rootProject.ext.quickAdapterVersion"
//微信支付
api
"com.tencent.mm.opensdk:wechat-sdk-android-with-mta:$rootProject.ext.wechatPayVersion"
}
}
}
}
RvFrame/src/main/res/layout/base_tab_layout.xml
View file @
1f0788ff
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
<ImageView
<ImageView
android:id=
"@+id/iv_home"
android:id=
"@+id/iv_home"
android:layout_width=
"2
5
dp"
android:layout_width=
"2
3
dp"
android:layout_height=
"2
5
dp"
android:layout_height=
"2
3
dp"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:src=
"@drawable/selector_rv_home"
/>
android:src=
"@drawable/selector_rv_home"
/>
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
android:paddingTop=
"3dp"
android:paddingTop=
"3dp"
android:text=
"首页"
android:text=
"首页"
android:textColor=
"@color/uiTextColorH3"
android:textColor=
"@color/uiTextColorH3"
android:textSize=
"@dimen/ui_text_size_h
6
"
/>
android:textSize=
"@dimen/ui_text_size_h
7
"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
<RelativeLayout
...
@@ -39,8 +39,8 @@
...
@@ -39,8 +39,8 @@
<ImageView
<ImageView
android:id=
"@+id/iv_travel"
android:id=
"@+id/iv_travel"
android:layout_width=
"2
5
dp"
android:layout_width=
"2
3
dp"
android:layout_height=
"2
5
dp"
android:layout_height=
"2
3
dp"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:src=
"@drawable/selector_rv_travel"
/>
android:src=
"@drawable/selector_rv_travel"
/>
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
android:paddingTop=
"3dp"
android:paddingTop=
"3dp"
android:text=
"旅行"
android:text=
"旅行"
android:textColor=
"@color/uiTextColorH3"
android:textColor=
"@color/uiTextColorH3"
android:textSize=
"@dimen/ui_text_size_h
6
"
/>
android:textSize=
"@dimen/ui_text_size_h
7
"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
<RelativeLayout
...
@@ -64,8 +64,8 @@
...
@@ -64,8 +64,8 @@
<ImageView
<ImageView
android:id=
"@+id/iv_camp"
android:id=
"@+id/iv_camp"
android:layout_width=
"2
5
dp"
android:layout_width=
"2
3
dp"
android:layout_height=
"2
5
dp"
android:layout_height=
"2
3
dp"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:src=
"@drawable/selector_rv_camp"
/>
android:src=
"@drawable/selector_rv_camp"
/>
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
android:paddingTop=
"3dp"
android:paddingTop=
"3dp"
android:text=
"营地"
android:text=
"营地"
android:textColor=
"@color/uiTextColorH3"
android:textColor=
"@color/uiTextColorH3"
android:textSize=
"@dimen/ui_text_size_h
6
"
/>
android:textSize=
"@dimen/ui_text_size_h
7
"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
<RelativeLayout
...
@@ -89,8 +89,8 @@
...
@@ -89,8 +89,8 @@
<ImageView
<ImageView
android:id=
"@+id/iv_found"
android:id=
"@+id/iv_found"
android:layout_width=
"2
5
dp"
android:layout_width=
"2
3
dp"
android:layout_height=
"2
5
dp"
android:layout_height=
"2
3
dp"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:src=
"@drawable/selector_rv_found"
/>
android:src=
"@drawable/selector_rv_found"
/>
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
android:paddingTop=
"3dp"
android:paddingTop=
"3dp"
android:text=
"发现"
android:text=
"发现"
android:textColor=
"@color/uiTextColorH3"
android:textColor=
"@color/uiTextColorH3"
android:textSize=
"@dimen/ui_text_size_h
6
"
/>
android:textSize=
"@dimen/ui_text_size_h
7
"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
<RelativeLayout
...
@@ -114,8 +114,8 @@
...
@@ -114,8 +114,8 @@
<ImageView
<ImageView
android:id=
"@+id/iv_mine"
android:id=
"@+id/iv_mine"
android:layout_width=
"2
5
dp"
android:layout_width=
"2
3
dp"
android:layout_height=
"2
5
dp"
android:layout_height=
"2
3
dp"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:src=
"@drawable/selector_rv_mine"
/>
android:src=
"@drawable/selector_rv_mine"
/>
...
@@ -128,7 +128,7 @@
...
@@ -128,7 +128,7 @@
android:paddingTop=
"3dp"
android:paddingTop=
"3dp"
android:text=
"我的"
android:text=
"我的"
android:textColor=
"@color/uiTextColorH3"
android:textColor=
"@color/uiTextColorH3"
android:textSize=
"@dimen/ui_text_size_h
6
"
/>
android:textSize=
"@dimen/ui_text_size_h
7
"
/>
</RelativeLayout>
</RelativeLayout>
...
...
RvHome/src/main/java/com/rv/home/rv/module/ui/main/home/ConfirmOrderActivity.java
View file @
1f0788ff
...
@@ -15,10 +15,10 @@ import android.widget.LinearLayout;
...
@@ -15,10 +15,10 @@ import android.widget.LinearLayout;
import
android.widget.RatingBar
;
import
android.widget.RatingBar
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.frame.base.glide.GlideManager
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.ruiwenliu.wrapper.util.ViewHolder
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.tencent.mm.opensdk.modelpay.PayReq
;
import
com.tencent.mm.opensdk.modelpay.PayReq
;
import
com.tencent.mm.opensdk.openapi.IWXAPI
;
import
com.tencent.mm.opensdk.openapi.IWXAPI
;
import
com.tencent.mm.opensdk.openapi.WXAPIFactory
;
import
com.tencent.mm.opensdk.openapi.WXAPIFactory
;
...
...
RvHome/src/main/java/com/rv/home/rv/module/ui/main/home/DrivingUploadActivity.java
View file @
1f0788ff
...
@@ -12,8 +12,8 @@ import android.widget.ImageView;
...
@@ -12,8 +12,8 @@ import android.widget.ImageView;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.frame.base.glide.GlideManager
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.rv.home.R
;
import
com.rv.home.R
;
import
com.rv.home.R2
;
import
com.rv.home.R2
;
import
com.rv.home.rv.module.basic.BaseStatusActivity
;
import
com.rv.home.rv.module.basic.BaseStatusActivity
;
...
...
RvHome/src/main/java/com/rv/home/rv/module/ui/main/home/ShareImageActivity.java
View file @
1f0788ff
...
@@ -7,16 +7,14 @@ import android.graphics.Bitmap;
...
@@ -7,16 +7,14 @@ import android.graphics.Bitmap;
import
android.graphics.Canvas
;
import
android.graphics.Canvas
;
import
android.graphics.Color
;
import
android.graphics.Color
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.v4.widget.NestedScrollView
;
import
android.support.v7.app.AppCompatActivity
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.frame.base.glide.GlideManager
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.swipe.SwipeBackActivity
;
import
com.ruiwenliu.wrapper.base.swipe.SwipeBackActivity
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.ruiwenliu.wrapper.util.um.CustomShareListener
;
import
com.ruiwenliu.wrapper.util.um.CustomShareListener
;
import
com.ruiwenliu.wrapper.util.um.ShareManager
;
import
com.ruiwenliu.wrapper.util.um.ShareManager
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
...
@@ -69,7 +67,6 @@ public class ShareImageActivity extends SwipeBackActivity<CommonPresenter> {
...
@@ -69,7 +67,6 @@ public class ShareImageActivity extends SwipeBackActivity<CommonPresenter> {
showTitle
(
false
);
showTitle
(
false
);
mCarBean
=
(
CarTypeListBean
.
DataBeanX
.
DataBean
)
getIntent
().
getSerializableExtra
(
"carBean"
);
mCarBean
=
(
CarTypeListBean
.
DataBeanX
.
DataBean
)
getIntent
().
getSerializableExtra
(
"carBean"
);
GlideManager
.
getInstance
(
this
).
loadImage
(
mCarBean
.
getVehicleModel
().
getPicture
(),
ivGoods
);
GlideManager
.
getInstance
(
this
).
loadImage
(
mCarBean
.
getVehicleModel
().
getPicture
(),
ivGoods
);
// GlideManager.getInstance(this).loadImage(" http://www.rv360.cn/Uploads/201309/5247f93872df1.jpg", ivCode);
tvName
.
setText
(
mCarBean
.
getVehicleModel
().
getName
());
tvName
.
setText
(
mCarBean
.
getVehicleModel
().
getName
());
tvContent
.
setText
(
mCarBean
.
getVehicleModel
().
getKeyword
());
tvContent
.
setText
(
mCarBean
.
getVehicleModel
().
getKeyword
());
tvPrice
.
setText
(
String
.
format
(
"%1$s%2$s"
,
mCarBean
.
getVehicleModel
().
getPrice
(),
this
.
getString
(
R
.
string
.
rv_day
)));
tvPrice
.
setText
(
String
.
format
(
"%1$s%2$s"
,
mCarBean
.
getVehicleModel
().
getPrice
(),
this
.
getString
(
R
.
string
.
rv_day
)));
...
...
RvWrapper/build.gradle
View file @
1f0788ff
...
@@ -39,28 +39,18 @@ dependencies {
...
@@ -39,28 +39,18 @@ dependencies {
/*fragment*/
/*fragment*/
api
'me.yokeyword:fragmentation:1.3.5'
api
'me.yokeyword:fragmentation:1.3.5'
/*适配*/
/*适配*/
// api 'com.zhy:autolayout:1.4.5'
api
'me.jessyan:autosize:1.1.2'
api
'me.jessyan:autosize:1.1.2'
/*网络请求相关*/
// implementation 'com.alibaba:fastjson:1.1.68.android'
/*rxJava*/
//导入Gson 库
// implementation 'com.google.code.gson:gson:2.6.2'
// compile 'com.alibaba:fastjson:1.1.56.android'
//导入RxJava 和 RxAndroid
//导入RxJava 和 RxAndroid
api
'io.reactivex.rxjava2:rxandroid:2.0.2'
api
'io.reactivex.rxjava2:rxandroid:2.0.2'
api
'io.reactivex.rxjava2:rxjava:2.1.12'
api
'io.reactivex.rxjava2:rxjava:2.1.12'
api
'com.squareup.retrofit2:retrofit:2.3.0'
api
'com.squareup.retrofit2:retrofit:2.3.0'
//导入retrofit
//导入retrofit
api
'com.squareup.retrofit2:converter-gson:2.3.0'
api
'com.squareup.retrofit2:converter-gson:2.3.0'
api
"com.google.code.gson:gson:$rootProject.ext.gsonVersion"
//OkHttp 利用OkGo
//api "com.squareup.okhttp3:okhttp:$rootProject.ext.okHttpVersion"
api
"com.squareup.okhttp3:logging-interceptor:$rootProject.ext.okHttpVersion"
//转换器,请求结果转换成Model
//转换器,请求结果转换成Model
api
'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
api
'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
//OkHttp
api
"com.squareup.okhttp3:okhttp:$rootProject.ext.okHttpVersion"
api
"com.squareup.okhttp3:logging-interceptor:$rootProject.ext.okHttpVersion"
//百度定位
//百度定位
api
files
(
'libs/BaiduLBS_Android.jar'
)
api
files
(
'libs/BaiduLBS_Android.jar'
)
//bugly
//bugly
...
@@ -72,17 +62,7 @@ dependencies {
...
@@ -72,17 +62,7 @@ dependencies {
api
files
(
'libs/umeng-share-wechat-simplify-6.9.4.jar'
)
api
files
(
'libs/umeng-share-wechat-simplify-6.9.4.jar'
)
api
files
(
'libs/umeng-shareboard-widget-6.9.4.jar'
)
api
files
(
'libs/umeng-shareboard-widget-6.9.4.jar'
)
api
files
(
'libs/umeng-sharetool-6.9.4.jar'
)
api
files
(
'libs/umeng-sharetool-6.9.4.jar'
)
//glide加载图片
api
"com.github.bumptech.glide:glide:$rootProject.ext.glideVersion"
annotationProcessor
"com.github.bumptech.glide:compiler:$rootProject.ext.glideVersion"
api
'com.github.bumptech.glide:okhttp3-integration:4.3.1'
api
'com.davemorrissey.labs:subsampling-scale-image-view:3.9.0'
api
'com.davemorrissey.labs:subsampling-scale-image-view:3.9.0'
//适配器
api
"com.github.CymChad:BaseRecyclerViewAdapterHelper:$rootProject.ext.quickAdapterVersion"
//微信支付
api
"com.tencent.mm.opensdk:wechat-sdk-android-with-mta:$rootProject.ext.wechatPayVersion"
api
project
(
path:
':RvFrame'
)
api
project
(
path:
':RvFrame'
)
}
}
RvWrapper/src/main/java/com/ruiwenliu/wrapper/http/OkHttpCreate.java
View file @
1f0788ff
...
@@ -14,7 +14,6 @@ import okhttp3.OkHttpClient;
...
@@ -14,7 +14,6 @@ import okhttp3.OkHttpClient;
import
okhttp3.Request
;
import
okhttp3.Request
;
import
okhttp3.Response
;
import
okhttp3.Response
;
import
okhttp3.logging.HttpLoggingInterceptor
;
import
okhttp3.logging.HttpLoggingInterceptor
;
//import okhttp3.logging.HttpLoggingInterceptor;
/**
/**
* Created by Amuse
* Created by Amuse
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/http/ProgressInterceptor.java
deleted
100644 → 0
View file @
6c1c0633
package
com
.
ruiwenliu
.
wrapper
.
http
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.Map
;
import
okhttp3.Interceptor
;
import
okhttp3.Request
;
import
okhttp3.Response
;
import
okhttp3.ResponseBody
;
/**
* @author guolin
* @since 2017/11/5
*/
public
class
ProgressInterceptor
implements
Interceptor
{
static
final
Map
<
String
,
ProgressListener
>
LISTENER_MAP
=
new
HashMap
<>();
public
static
void
addListener
(
String
url
,
ProgressListener
listener
)
{
LISTENER_MAP
.
put
(
url
,
listener
);
}
public
static
void
removeListener
(
String
url
)
{
LISTENER_MAP
.
remove
(
url
);
}
@Override
public
Response
intercept
(
Chain
chain
)
throws
IOException
{
Request
request
=
chain
.
request
();
Response
response
=
chain
.
proceed
(
request
);
String
url
=
request
.
url
().
toString
();
ResponseBody
body
=
response
.
body
();
Response
newResponse
=
response
.
newBuilder
().
body
(
new
ProgressResponseBody
(
url
,
body
)).
build
();
return
newResponse
;
}
}
RvWrapper/src/main/java/com/ruiwenliu/wrapper/http/ProgressListener.java
deleted
100644 → 0
View file @
6c1c0633
package
com
.
ruiwenliu
.
wrapper
.
http
;
/**
* @author guolin
* @since 2017/11/5
*/
public
interface
ProgressListener
{
/**
* 当下载进度发生变化时,会回调此方法。
* @param progress
* 当前的下载进度,参数值的范围是0-100。
*/
void
onProgress
(
int
progress
);
}
\ No newline at end of file
RvWrapper/src/main/java/com/ruiwenliu/wrapper/http/ProgressResponseBody.java
deleted
100644 → 0
View file @
6c1c0633
package
com
.
ruiwenliu
.
wrapper
.
http
;
import
android.util.Log
;
import
java.io.IOException
;
import
okhttp3.MediaType
;
import
okhttp3.ResponseBody
;
import
okio.Buffer
;
import
okio.BufferedSource
;
import
okio.ForwardingSource
;
import
okio.Okio
;
import
okio.Source
;
/**
* @author guolin
* @since 2017/11/5
*/
public
class
ProgressResponseBody
extends
ResponseBody
{
private
static
final
String
TAG
=
"ProgressResponseBody"
;
private
BufferedSource
bufferedSource
;
private
ResponseBody
responseBody
;
private
ProgressListener
listener
;
public
ProgressResponseBody
(
String
url
,
ResponseBody
responseBody
)
{
this
.
responseBody
=
responseBody
;
listener
=
ProgressInterceptor
.
LISTENER_MAP
.
get
(
url
);
}
@Override
public
MediaType
contentType
()
{
return
responseBody
.
contentType
();
}
@Override
public
long
contentLength
()
{
return
responseBody
.
contentLength
();
}
@Override
public
BufferedSource
source
()
{
if
(
bufferedSource
==
null
)
{
bufferedSource
=
Okio
.
buffer
(
new
ProgressSource
(
responseBody
.
source
()));
}
return
bufferedSource
;
}
private
class
ProgressSource
extends
ForwardingSource
{
long
totalBytesRead
=
0
;
int
currentProgress
;
ProgressSource
(
Source
source
)
{
super
(
source
);
}
@Override
public
long
read
(
Buffer
sink
,
long
byteCount
)
throws
IOException
{
long
bytesRead
=
super
.
read
(
sink
,
byteCount
);
long
fullLength
=
responseBody
.
contentLength
();
if
(
bytesRead
==
-
1
)
{
totalBytesRead
=
fullLength
;
}
else
{
totalBytesRead
+=
bytesRead
;
}
int
progress
=
(
int
)
(
100
f
*
totalBytesRead
/
fullLength
);
Log
.
d
(
TAG
,
"download progress is "
+
progress
);
if
(
listener
!=
null
&&
progress
!=
currentProgress
)
{
listener
.
onProgress
(
progress
);
}
if
(
listener
!=
null
&&
totalBytesRead
==
fullLength
)
{
listener
=
null
;
}
currentProgress
=
progress
;
return
bytesRead
;
}
}
}
RvWrapper/src/main/java/com/ruiwenliu/wrapper/util/BaseGlideHolder.java
View file @
1f0788ff
...
@@ -4,11 +4,8 @@ import android.content.Context;
...
@@ -4,11 +4,8 @@ import android.content.Context;
import
android.view.View
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
com.bumptech.glide.load.engine.DiskCacheStrategy
;
import
com.bumptech.glide.load.resource.bitmap.RoundedCorners
;
import
com.bumptech.glide.request.RequestOptions
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.
ruiwenliu.wrapper.util.glide.GlideApp
;
import
com.
frame.base.glide.GlideManager
;
/**
/**
* Created :Auser
* Created :Auser
...
@@ -16,10 +13,11 @@ import com.ruiwenliu.wrapper.util.glide.GlideApp;
...
@@ -16,10 +13,11 @@ import com.ruiwenliu.wrapper.util.glide.GlideApp;
* Desc:图片加载基类
* Desc:图片加载基类
*/
*/
public
class
BaseGlideHolder
extends
BaseViewHolder
{
public
class
BaseGlideHolder
extends
BaseViewHolder
{
public
BaseGlideHolder
(
View
view
)
{
public
BaseGlideHolder
(
View
view
)
{
super
(
view
);
super
(
view
);
}
}
/**
/**
* 加载普通图片
* 加载普通图片
*
*
...
@@ -27,76 +25,21 @@ public class BaseGlideHolder extends BaseViewHolder{
...
@@ -27,76 +25,21 @@ public class BaseGlideHolder extends BaseViewHolder{
* @param image
* @param image
*/
*/
public
void
loadImage
(
Context
context
,
String
url
,
ImageView
image
)
{
public
void
loadImage
(
Context
context
,
String
url
,
ImageView
image
)
{
GlideApp
.
with
(
context
)
.
load
(
url
)
.
apply
(
new
RequestOptions
()
.
skipMemoryCache
(
true
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
))
.
into
(
image
);
}
/**
GlideManager
.
getInstance
(
context
).
loadImage
(
url
,
image
);
* 加载普通图片
*
* @param url
* @param image
*/
public
void
loadImage
(
Context
context
,
String
url
,
ImageView
image
,
int
x
,
int
y
)
{
GlideApp
.
with
(
context
)
.
load
(
url
)
.
apply
(
new
RequestOptions
()
.
skipMemoryCache
(
true
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
).
override
(
x
,
y
))
.
into
(
image
);
}
}
/**
* 加载圆角图片
*
* @param url
* @param image
* @param round
*/
public
void
loadRoundImage
(
Context
context
,
String
url
,
ImageView
image
,
int
round
)
{
GlideApp
.
with
(
context
)
.
load
(
url
)
.
apply
(
RequestOptions
.
bitmapTransform
(
new
RoundedCorners
(
round
)))
.
into
(
image
);
}
/**
/**
* 加载圆角图片
* 加载圆角图片
* 通过RequestOptions扩展功能,override:采样率,因为ImageView就这么大,可以压缩图片,降低内存消耗,设置图片压缩比例
*
*
* @param url
* @param url
* @param image
* @param image
* @param round
* @param round
* @param x
* @param y
*/
*/
public
void
loadRoundImage
(
Context
context
,
String
url
,
ImageView
image
,
int
round
,
int
x
,
int
y
)
{
public
void
loadRoundImage
(
Context
context
,
String
url
,
ImageView
image
,
int
round
)
{
GlideApp
.
with
(
context
)
.
load
(
url
)
.
apply
(
RequestOptions
.
bitmapTransform
(
new
RoundedCorners
(
round
)).
override
(
50
,
50
))
.
into
(
image
);
}
/**
loadImage
(
context
,
url
,
image
);
* 加载圆形图片
*
* @param url
* @param image
*/
public
void
loadCircleImage
(
Context
context
,
String
url
,
ImageView
image
)
{
GlideApp
.
with
(
context
)
.
load
(
url
)
.
apply
(
RequestOptions
.
circleCropTransform
()
.
diskCacheStrategy
(
DiskCacheStrategy
.
NONE
)
//不做磁盘缓存
.
skipMemoryCache
(
true
)
//不做内存缓存
)
.
into
(
image
);
}
}
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/util/glide/GlideCache.java
deleted
100644 → 0
View file @
6c1c0633
package
com
.
ruiwenliu
.
wrapper
.
util
.
glide
;
import
android.content.Context
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.GlideBuilder
;
import
com.bumptech.glide.Registry
;
import
com.bumptech.glide.annotation.GlideModule
;
import
com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader
;
import
com.bumptech.glide.load.DecodeFormat
;
import
com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory
;
import
com.bumptech.glide.load.engine.cache.LruResourceCache
;
import
com.bumptech.glide.load.model.GlideUrl
;
import
com.bumptech.glide.module.AppGlideModule
;
import
com.bumptech.glide.request.RequestOptions
;
import
com.ruiwenliu.wrapper.http.ProgressInterceptor
;
import
java.io.InputStream
;
import
okhttp3.OkHttpClient
;
//import com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader;
/**
* Created by Amuse
* Data:2018/11/27 0027
* Desc:glide缓存处理
*/
@GlideModule
public
class
GlideCache
extends
AppGlideModule
{
public
static
final
int
GLIDE_DISK_SIZE
=
1024
*
1024
*
200
;
public
static
final
int
GLIDE_MEMORY_SIZE
=
5
*
1024
*
1024
;
public
static
final
String
GLIDE_DISK_NAME
=
"GlideManagerCache"
;
@Override
public
boolean
isManifestParsingEnabled
()
{
// return super.isManifestParsingEnabled();
return
false
;
}
@Override
public
void
applyOptions
(
Context
context
,
GlideBuilder
builder
)
{
//自定义缓存目录,磁盘缓存给150M 另外一种设置缓存方式
builder
.
setDiskCache
(
new
InternalCacheDiskCacheFactory
(
context
,
GLIDE_DISK_NAME
,
GLIDE_DISK_SIZE
));
builder
.
setMemoryCache
(
new
LruResourceCache
(
GLIDE_MEMORY_SIZE
));
//配置图片缓存格式 默认格式为8888
builder
.
setDefaultRequestOptions
(
RequestOptions
.
formatOf
(
DecodeFormat
.
PREFER_ARGB_8888
));
}
@Override
public
void
registerComponents
(
Context
context
,
Glide
glide
,
Registry
registry
)
{
OkHttpClient
.
Builder
builder
=
new
OkHttpClient
.
Builder
();
builder
.
addInterceptor
(
new
ProgressInterceptor
());
OkHttpClient
okHttpClient
=
builder
.
build
();
registry
.
replace
(
GlideUrl
.
class
,
InputStream
.
class
,
new
OkHttpUrlLoader
.
Factory
(
okHttpClient
));
}
}
RvWrapper/src/main/java/com/ruiwenliu/wrapper/util/glide/GlideCacheUtil.java
deleted
100644 → 0
View file @
6c1c0633
package
com
.
ruiwenliu
.
wrapper
.
util
.
glide
;
import
android.content.Context
;
import
android.os.Looper
;
import
android.text.TextUtils
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.load.engine.cache.ExternalPreferredCacheDiskCacheFactory
;
import
java.io.File
;
import
java.math.BigDecimal
;
/**
* Created by Amuse
* Data:2018/11/27 0027
* Desc:缓存工具类
*/
public
class
GlideCacheUtil
{
private
static
GlideCacheUtil
inst
;
private
Context
mContext
;
public
GlideCacheUtil
(
Context
context
)
{
mContext
=
context
.
getApplicationContext
();
}
public
static
GlideCacheUtil
getInstance
(
Context
context
)
{
if
(
inst
==
null
)
{
inst
=
new
GlideCacheUtil
(
context
);
}
return
inst
;
}
/**
* 清除图片磁盘缓存
*/
public
boolean
clearImageDiskCache
()
{
try
{
if
(
Looper
.
myLooper
()
==
Looper
.
getMainLooper
())
{
new
Thread
(
new
Runnable
()
{
@Override
public
void
run
()
{
Glide
.
get
(
mContext
.
getApplicationContext
()).
clearDiskCache
();
// BusUtil.getBus().post(new GlideCacheClearSuccessEvent());
}
}).
start
();
}
else
{
Glide
.
get
(
mContext
).
clearDiskCache
();
}
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
/**
* 清除图片内存缓存
*/
public
boolean
clearImageMemoryCache
()
{
try
{
if
(
Looper
.
myLooper
()
==
Looper
.
getMainLooper
())
{
//只能在主线程执行
Glide
.
get
(
mContext
).
clearMemory
();
return
true
;
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
/**
* 清除图片所有缓存
*/
public
void
clearImageAllCache
()
{
clearImageDiskCache
();
clearImageMemoryCache
();
String
ImageExternalCatchDir
=
mContext
.
getExternalCacheDir
()+
ExternalPreferredCacheDiskCacheFactory
.
DEFAULT_DISK_CACHE_DIR
;
deleteFolderFile
(
ImageExternalCatchDir
,
true
);
}
/**
* 获取Glide造成的缓存大小
*
* @return CacheSize
*/
public
String
getCacheSize
()
{
try
{
return
getFormatSize
(
getFolderSize
(
new
File
(
mContext
.
getCacheDir
()
+
"/"
+
GlideCache
.
GLIDE_DISK_NAME
)));
// return getFormatSize(getFolderSize(new File(mContext.getCacheDir() + "/"+ InternalCacheDiskCacheFactory.DEFAULT_DISK_CACHE_DIR)));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
""
;
}
/**
* 获取指定文件夹内所有文件大小的和
*
* @param file file
* @return size
* @throws Exception
*/
private
long
getFolderSize
(
File
file
)
throws
Exception
{
long
size
=
0
;
try
{
File
[]
fileList
=
file
.
listFiles
();
for
(
File
aFileList
:
fileList
)
{
if
(
aFileList
.
isDirectory
())
{
size
=
size
+
getFolderSize
(
aFileList
);
}
else
{
size
=
size
+
aFileList
.
length
();
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
size
;
}
/**
* 删除指定目录下的文件,这里用于缓存的删除
*
* @param filePath filePath
* @param deleteThisPath deleteThisPath
*/
private
void
deleteFolderFile
(
String
filePath
,
boolean
deleteThisPath
)
{
if
(!
TextUtils
.
isEmpty
(
filePath
))
{
try
{
File
file
=
new
File
(
filePath
);
if
(
file
.
isDirectory
())
{
File
files
[]
=
file
.
listFiles
();
for
(
File
file1
:
files
)
{
deleteFolderFile
(
file1
.
getAbsolutePath
(),
true
);
}
}
if
(
deleteThisPath
)
{
if
(!
file
.
isDirectory
())
{
file
.
delete
();
}
else
{
if
(
file
.
listFiles
().
length
==
0
)
{
file
.
delete
();
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
/**
* 格式化单位
*
* @param size size
* @return size
*/
private
static
String
getFormatSize
(
double
size
)
{
double
kiloByte
=
size
/
1024
;
if
(
kiloByte
<
1
)
{
return
size
+
"Byte"
;
}
double
megaByte
=
kiloByte
/
1024
;
if
(
megaByte
<
1
)
{
BigDecimal
result1
=
new
BigDecimal
(
Double
.
toString
(
kiloByte
));
return
result1
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
()
+
"KB"
;
}
double
gigaByte
=
megaByte
/
1024
;
if
(
gigaByte
<
1
)
{
BigDecimal
result2
=
new
BigDecimal
(
Double
.
toString
(
megaByte
));
return
result2
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
()
+
"MB"
;
}
double
teraBytes
=
gigaByte
/
1024
;
if
(
teraBytes
<
1
)
{
BigDecimal
result3
=
new
BigDecimal
(
Double
.
toString
(
gigaByte
));
return
result3
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
()
+
"GB"
;
}
BigDecimal
result4
=
new
BigDecimal
(
teraBytes
);
return
result4
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
()
+
"TB"
;
}
}
RvWrapper/src/main/java/com/ruiwenliu/wrapper/util/glide/GlideManager.java
deleted
100644 → 0
View file @
6c1c0633
package
com
.
ruiwenliu
.
wrapper
.
util
.
glide
;
import
android.content.Context
;
import
android.graphics.drawable.Drawable
;
import
android.support.annotation.Nullable
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.widget.ImageView
;
import
android.widget.Toast
;
import
com.bumptech.glide.gifdecoder.GifDecoder
;
import
com.bumptech.glide.load.DataSource
;
import
com.bumptech.glide.load.engine.DiskCacheStrategy
;
import
com.bumptech.glide.load.engine.GlideException
;
import
com.bumptech.glide.load.resource.bitmap.RoundedCorners
;
import
com.bumptech.glide.load.resource.gif.GifDrawable
;
import
com.bumptech.glide.request.RequestListener
;
import
com.bumptech.glide.request.RequestOptions
;
import
com.bumptech.glide.request.target.Target
;
import
com.ruiwenliu.wrapper.R
;
import
java.lang.reflect.Field
;
/**
* Created by Amuse
* Data:2018/11/27 0027
* Desc:glide加载图片
*/
public
class
GlideManager
{
private
Context
mContext
;
public
GlideManager
(
Context
context
)
{
this
.
mContext
=
context
.
getApplicationContext
();
}
private
static
GlideManager
glideManager
;
public
static
GlideManager
getInstance
(
Context
context
)
{
if
(
glideManager
==
null
)
{
glideManager
=
new
GlideManager
(
context
);
}
return
glideManager
;
}
/**
* 加载普通图片
*
* @param url
* @param image
*/
public
void
loadImage
(
String
url
,
ImageView
image
)
{
GlideApp
.
with
(
mContext
)
.
load
(
url
)
.
apply
(
new
RequestOptions
()
.
skipMemoryCache
(
true
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
))
.
into
(
image
);
}
/**
* 加载普通图片
*
* @param url
* @param image
*/
public
void
loadImage
(
String
url
,
ImageView
image
,
int
x
,
int
y
)
{
GlideApp
.
with
(
mContext
)
.
load
(
url
)
.
apply
(
new
RequestOptions
()
.
skipMemoryCache
(
true
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
).
override
(
x
,
y
))
.
into
(
image
);
}
/**
* 加载圆角图片
*
* @param url
* @param image
* @param round
*/
public
void
loadRoundImage
(
String
url
,
ImageView
image
,
int
round
)
{
GlideApp
.
with
(
mContext
)
.
load
(
url
)
.
apply
(
RequestOptions
.
bitmapTransform
(
new
RoundedCorners
(
round
)))
.
into
(
image
);
}
/**
* 加载圆角图片
* 通过RequestOptions扩展功能,override:采样率,因为ImageView就这么大,可以压缩图片,降低内存消耗,设置图片压缩比例
*
* @param url
* @param image
* @param round
* @param x
* @param y
*/
public
void
loadRoundImage
(
String
url
,
ImageView
image
,
int
round
,
int
x
,
int
y
)
{
GlideApp
.
with
(
mContext
)
.
load
(
url
)
.
apply
(
RequestOptions
.
bitmapTransform
(
new
RoundedCorners
(
round
)).
override
(
50
,
50
))
.
into
(
image
);
}
/**
* 加载圆形图片
*
* @param url
* @param image
*/
public
void
loadCircleImage
(
String
url
,
ImageView
image
)
{
GlideApp
.
with
(
mContext
)
.
load
(
url
)
.
apply
(
RequestOptions
.
circleCropTransform
()
.
diskCacheStrategy
(
DiskCacheStrategy
.
NONE
)
//不做磁盘缓存
.
skipMemoryCache
(
true
)
//不做内存缓存
)
.
into
(
image
);
}
/**
* 加载圆形图片
*
* @param url
* @param image
* @param number 循环播放次数
*/
public
void
loadGifImage
(
String
url
,
final
ImageView
image
,
final
int
number
)
{
GlideApp
.
with
(
mContext
)
.
asGif
()
.
load
(
url
)
.
apply
(
new
RequestOptions
()
.
skipMemoryCache
(
true
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
))
.
placeholder
(
R
.
drawable
.
placeholder
)
.
fallback
(
R
.
drawable
.
placeholder
)
.
listener
(
new
RequestListener
<
GifDrawable
>()
{
@Override
public
boolean
onLoadFailed
(
@Nullable
GlideException
e
,
Object
model
,
Target
<
GifDrawable
>
target
,
boolean
isFirstResource
)
{
Toast
.
makeText
(
mContext
,
"加载失败"
,
Toast
.
LENGTH_SHORT
).
show
();
return
false
;
}
@Override
public
boolean
onResourceReady
(
GifDrawable
gifDrawable
,
Object
model
,
Target
<
GifDrawable
>
target
,
DataSource
dataSource
,
boolean
isFirstResource
)
{
//设置循环播放次数为1次
gifDrawable
.
setLoopCount
(
number
);
// getGifduration(gifDrawable);//获取Gif时长
return
false
;
}
}).
into
(
image
);
}
/**
* 获取Gif时长
*/
private
void
getGifDuration
(
GifDrawable
gifDrawable
)
{
try
{
// 计算动画时长
int
duration
=
0
;
//GifDecoder decoder = gifDrawable.getDecoder();//4.0开始没有这个方法了
/***
* 通过反射获取时长
*/
Drawable
.
ConstantState
state
=
gifDrawable
.
getConstantState
();
if
(
state
!=
null
)
{
//不能混淆GifFrameLoader和GifState类
Object
gifFrameLoader
=
getValue
(
state
,
"frameLoader"
);
if
(
gifFrameLoader
!=
null
)
{
Object
decoder
=
getValue
(
gifFrameLoader
,
"gifDecoder"
);
if
(
decoder
!=
null
&&
decoder
instanceof
GifDecoder
)
{
for
(
int
i
=
0
;
i
<
gifDrawable
.
getFrameCount
();
i
++)
{
duration
+=
((
GifDecoder
)
decoder
).
getDelay
(
i
);
}
}
}
Log
.
e
(
"Glide4.7.1"
,
"gif播放一次动画时长:"
+
duration
);
}
}
catch
(
Throwable
e
)
{
}
}
/**
* 通过字段名从对象或对象的父类中得到字段的值
*
* @param object 对象实例
* @param fieldName 字段名
* @return 字段对应的值
* @throws Exception
*/
public
static
Object
getValue
(
Object
object
,
String
fieldName
)
throws
Exception
{
if
(
object
==
null
)
{
return
null
;
}
if
(
TextUtils
.
isEmpty
(
fieldName
))
{
return
null
;
}
Field
field
=
null
;
Class
<?>
clazz
=
object
.
getClass
();
for
(;
clazz
!=
Object
.
class
;
clazz
=
clazz
.
getSuperclass
())
{
try
{
field
=
clazz
.
getDeclaredField
(
fieldName
);
field
.
setAccessible
(
true
);
return
field
.
get
(
object
);
}
catch
(
Exception
e
)
{
//这里甚么都不要做!并且这里的异常必须这样写,不能抛出去。
//如果这里的异常打印或者往外抛,则就不会执行clazz = clazz.getSuperclass(),最后就不会进入到父类中了
}
}
return
null
;
}
}
RvWrapper/src/main/res/drawable-xhdpi/tab_chat_normal_nor.png
deleted
100644 → 0
View file @
6c1c0633
505 Bytes
Utils/build.gradle
View file @
1f0788ff
...
@@ -39,17 +39,11 @@ dependencies {
...
@@ -39,17 +39,11 @@ dependencies {
api
project
(
path:
':SweetDialog'
)
api
project
(
path:
':SweetDialog'
)
api
project
(
path:
':Resource'
)
api
project
(
path:
':Resource'
)
//MultiDex 解决 64K 限制,方法数超过65535 与鲁班压缩版本不一致辞
//MultiDex 解决 64K 限制,方法数超过65535 与鲁班压缩版本不一致辞
api
'com.android.support:multidex:1.0.2'
api
'com.android.support:multidex:1.0.2'
//老的http
//老的http
api
files
(
'libs/org.apache.http.legacy.jar'
)
api
files
(
'libs/org.apache.http.legacy.jar'
)
//Glide
//api "com.github.bumptech.glide:glide:$rootProject.ext.glideVersion"
api
"com.github.bumptech.glide:glide:$rootProject.ext.glideVersion"
annotationProcessor
"com.github.bumptech.glide:compiler:$rootProject.ext.glideVersion"
api
'com.github.bumptech.glide:okhttp3-integration:4.3.1'
// Gson
// Gson
//api 'com.squareup.retrofit2:converter-gson:2.1.0'
//api 'com.squareup.retrofit2:converter-gson:2.1.0'
...
...
Utils/src/main/java/com/base/utils/ui/image/glide/GlideCache.java
deleted
100644 → 0
View file @
6c1c0633
package
com
.
base
.
utils
.
ui
.
image
.
glide
;
import
android.content.Context
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.GlideBuilder
;
import
com.bumptech.glide.Registry
;
import
com.bumptech.glide.annotation.GlideModule
;
import
com.bumptech.glide.load.DecodeFormat
;
import
com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory
;
import
com.bumptech.glide.load.engine.cache.LruResourceCache
;
import
com.bumptech.glide.module.AppGlideModule
;
import
com.bumptech.glide.request.RequestOptions
;
/**
* Created by Amuse
* Data:2018/11/27 0027
* Desc:glide缓存处理
*/
@GlideModule
public
class
GlideCache
extends
AppGlideModule
{
public
static
final
int
GLIDE_DISK_SIZE
=
1024
*
1024
*
200
;
public
static
final
int
GLIDE_MEMORY_SIZE
=
5
*
1024
*
1024
;
public
static
final
String
GLIDE_DISK_NAME
=
"GlideManagerCache"
;
@Override
public
boolean
isManifestParsingEnabled
()
{
// return super.isManifestParsingEnabled();
return
false
;
}
@Override
public
void
applyOptions
(
Context
context
,
GlideBuilder
builder
)
{
//自定义缓存目录,磁盘缓存给150M 另外一种设置缓存方式
builder
.
setDiskCache
(
new
InternalCacheDiskCacheFactory
(
context
,
GLIDE_DISK_NAME
,
GLIDE_DISK_SIZE
));
builder
.
setMemoryCache
(
new
LruResourceCache
(
GLIDE_MEMORY_SIZE
));
//配置图片缓存格式 默认格式为8888
builder
.
setDefaultRequestOptions
(
RequestOptions
.
formatOf
(
DecodeFormat
.
PREFER_ARGB_8888
));
}
@Override
public
void
registerComponents
(
Context
context
,
Glide
glide
,
Registry
registry
)
{
}
}
Utils/src/main/java/com/base/utils/ui/image/glide/GlideCacheUtil.java
deleted
100644 → 0
View file @
6c1c0633
package
com
.
base
.
utils
.
ui
.
image
.
glide
;
import
android.content.Context
;
import
android.os.Looper
;
import
android.text.TextUtils
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.load.engine.cache.ExternalPreferredCacheDiskCacheFactory
;
import
java.io.File
;
import
java.math.BigDecimal
;
/**
* Created by Amuse
* Data:2018/11/27 0027
* Desc:缓存工具类
*/
public
class
GlideCacheUtil
{
private
static
GlideCacheUtil
inst
;
private
Context
mContext
;
public
GlideCacheUtil
(
Context
context
)
{
mContext
=
context
.
getApplicationContext
();
}
public
static
GlideCacheUtil
getInstance
(
Context
context
)
{
if
(
inst
==
null
)
{
inst
=
new
GlideCacheUtil
(
context
);
}
return
inst
;
}
/**
* 清除图片磁盘缓存
*/
public
boolean
clearImageDiskCache
()
{
try
{
if
(
Looper
.
myLooper
()
==
Looper
.
getMainLooper
())
{
new
Thread
(
new
Runnable
()
{
@Override
public
void
run
()
{
Glide
.
get
(
mContext
.
getApplicationContext
()).
clearDiskCache
();
// BusUtil.getBus().post(new GlideCacheClearSuccessEvent());
}
}).
start
();
}
else
{
Glide
.
get
(
mContext
).
clearDiskCache
();
}
return
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
/**
* 清除图片内存缓存
*/
public
boolean
clearImageMemoryCache
()
{
try
{
if
(
Looper
.
myLooper
()
==
Looper
.
getMainLooper
())
{
//只能在主线程执行
Glide
.
get
(
mContext
).
clearMemory
();
return
true
;
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
/**
* 清除图片所有缓存
*/
public
void
clearImageAllCache
()
{
clearImageDiskCache
();
clearImageMemoryCache
();
String
ImageExternalCatchDir
=
mContext
.
getExternalCacheDir
()+
ExternalPreferredCacheDiskCacheFactory
.
DEFAULT_DISK_CACHE_DIR
;
deleteFolderFile
(
ImageExternalCatchDir
,
true
);
}
/**
* 获取Glide造成的缓存大小
*
* @return CacheSize
*/
public
String
getCacheSize
()
{
try
{
return
getFormatSize
(
getFolderSize
(
new
File
(
mContext
.
getCacheDir
()
+
"/"
+
GlideCache
.
GLIDE_DISK_NAME
)));
// return getFormatSize(getFolderSize(new File(mContext.getCacheDir() + "/"+ InternalCacheDiskCacheFactory.DEFAULT_DISK_CACHE_DIR)));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
""
;
}
/**
* 获取指定文件夹内所有文件大小的和
*
* @param file file
* @return size
* @throws Exception
*/
private
long
getFolderSize
(
File
file
)
throws
Exception
{
long
size
=
0
;
try
{
File
[]
fileList
=
file
.
listFiles
();
for
(
File
aFileList
:
fileList
)
{
if
(
aFileList
.
isDirectory
())
{
size
=
size
+
getFolderSize
(
aFileList
);
}
else
{
size
=
size
+
aFileList
.
length
();
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
size
;
}
/**
* 删除指定目录下的文件,这里用于缓存的删除
*
* @param filePath filePath
* @param deleteThisPath deleteThisPath
*/
private
void
deleteFolderFile
(
String
filePath
,
boolean
deleteThisPath
)
{
if
(!
TextUtils
.
isEmpty
(
filePath
))
{
try
{
File
file
=
new
File
(
filePath
);
if
(
file
.
isDirectory
())
{
File
files
[]
=
file
.
listFiles
();
for
(
File
file1
:
files
)
{
deleteFolderFile
(
file1
.
getAbsolutePath
(),
true
);
}
}
if
(
deleteThisPath
)
{
if
(!
file
.
isDirectory
())
{
file
.
delete
();
}
else
{
if
(
file
.
listFiles
().
length
==
0
)
{
file
.
delete
();
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
/**
* 格式化单位
*
* @param size size
* @return size
*/
private
static
String
getFormatSize
(
double
size
)
{
double
kiloByte
=
size
/
1024
;
if
(
kiloByte
<
1
)
{
return
size
+
"Byte"
;
}
double
megaByte
=
kiloByte
/
1024
;
if
(
megaByte
<
1
)
{
BigDecimal
result1
=
new
BigDecimal
(
Double
.
toString
(
kiloByte
));
return
result1
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
()
+
"KB"
;
}
double
gigaByte
=
megaByte
/
1024
;
if
(
gigaByte
<
1
)
{
BigDecimal
result2
=
new
BigDecimal
(
Double
.
toString
(
megaByte
));
return
result2
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
()
+
"MB"
;
}
double
teraBytes
=
gigaByte
/
1024
;
if
(
teraBytes
<
1
)
{
BigDecimal
result3
=
new
BigDecimal
(
Double
.
toString
(
gigaByte
));
return
result3
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
()
+
"GB"
;
}
BigDecimal
result4
=
new
BigDecimal
(
teraBytes
);
return
result4
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
()
+
"TB"
;
}
}
Utils/src/main/java/com/base/utils/ui/image/glide/GlideManager.java
deleted
100644 → 0
View file @
6c1c0633
package
com
.
base
.
utils
.
ui
.
image
.
glide
;
import
android.content.Context
;
import
android.graphics.drawable.Drawable
;
import
android.support.annotation.Nullable
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.widget.ImageView
;
import
android.widget.Toast
;
import
com.bumptech.glide.gifdecoder.GifDecoder
;
import
com.bumptech.glide.load.DataSource
;
import
com.bumptech.glide.load.engine.DiskCacheStrategy
;
import
com.bumptech.glide.load.engine.GlideException
;
import
com.bumptech.glide.load.resource.bitmap.RoundedCorners
;
import
com.bumptech.glide.load.resource.gif.GifDrawable
;
import
com.bumptech.glide.request.RequestListener
;
import
com.bumptech.glide.request.RequestOptions
;
import
com.bumptech.glide.request.target.Target
;
import
java.lang.reflect.Field
;
/**
* Created by Amuse
* Data:2018/11/27 0027
* Desc:glide加载图片
*/
public
class
GlideManager
{
private
Context
mContext
;
public
GlideManager
(
Context
context
)
{
this
.
mContext
=
context
.
getApplicationContext
();
}
private
static
GlideManager
glideManager
;
public
static
GlideManager
getInstance
(
Context
context
)
{
if
(
glideManager
==
null
)
{
glideManager
=
new
GlideManager
(
context
);
}
return
glideManager
;
}
/**
* 加载普通图片
*
* @param url
* @param image
*/
public
void
loadImage
(
String
url
,
ImageView
image
)
{
GlideApp
.
with
(
mContext
)
.
load
(
url
)
.
apply
(
new
RequestOptions
()
.
skipMemoryCache
(
true
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
))
.
into
(
image
);
}
/**
* 加载普通图片
*
* @param url
* @param image
*/
public
void
loadImage
(
String
url
,
ImageView
image
,
int
x
,
int
y
)
{
GlideApp
.
with
(
mContext
)
.
load
(
url
)
.
apply
(
new
RequestOptions
()
.
skipMemoryCache
(
true
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
).
override
(
x
,
y
))
.
into
(
image
);
}
/**
* 加载圆角图片
*
* @param url
* @param image
* @param round
*/
public
void
loadRoundImage
(
String
url
,
ImageView
image
,
int
round
)
{
GlideApp
.
with
(
mContext
)
.
load
(
url
)
.
apply
(
RequestOptions
.
bitmapTransform
(
new
RoundedCorners
(
round
)))
.
into
(
image
);
}
/**
* 加载圆角图片
* 通过RequestOptions扩展功能,override:采样率,因为ImageView就这么大,可以压缩图片,降低内存消耗,设置图片压缩比例
*
* @param url
* @param image
* @param round
* @param x
* @param y
*/
public
void
loadRoundImage
(
String
url
,
ImageView
image
,
int
round
,
int
x
,
int
y
)
{
GlideApp
.
with
(
mContext
)
.
load
(
url
)
.
apply
(
RequestOptions
.
bitmapTransform
(
new
RoundedCorners
(
round
)).
override
(
50
,
50
))
.
into
(
image
);
}
/**
* 加载圆形图片
*
* @param url
* @param image
*/
public
void
loadCircleImage
(
String
url
,
ImageView
image
)
{
GlideApp
.
with
(
mContext
)
.
load
(
url
)
.
apply
(
RequestOptions
.
circleCropTransform
()
.
diskCacheStrategy
(
DiskCacheStrategy
.
NONE
)
//不做磁盘缓存
.
skipMemoryCache
(
true
)
//不做内存缓存
)
.
into
(
image
);
}
/**
* 加载圆形图片
*
* @param url
* @param image
* @param number 循环播放次数
*/
public
void
loadGifImage
(
String
url
,
final
ImageView
image
,
final
int
number
)
{
GlideApp
.
with
(
mContext
)
.
asGif
()
.
load
(
url
)
.
apply
(
new
RequestOptions
()
.
skipMemoryCache
(
true
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
))
// .placeholder(R.drawable.placeholder)
// .fallback(R.drawable.placeholder)
.
listener
(
new
RequestListener
<
GifDrawable
>()
{
@Override
public
boolean
onLoadFailed
(
@Nullable
GlideException
e
,
Object
model
,
Target
<
GifDrawable
>
target
,
boolean
isFirstResource
)
{
Toast
.
makeText
(
mContext
,
"加载失败"
,
Toast
.
LENGTH_SHORT
).
show
();
return
false
;
}
@Override
public
boolean
onResourceReady
(
GifDrawable
gifDrawable
,
Object
model
,
Target
<
GifDrawable
>
target
,
DataSource
dataSource
,
boolean
isFirstResource
)
{
//设置循环播放次数为1次
gifDrawable
.
setLoopCount
(
number
);
// getGifduration(gifDrawable);//获取Gif时长
return
false
;
}
}).
into
(
image
);
}
/**
* 获取Gif时长
*/
private
void
getGifDuration
(
GifDrawable
gifDrawable
)
{
try
{
// 计算动画时长
int
duration
=
0
;
//GifDecoder decoder = gifDrawable.getDecoder();//4.0开始没有这个方法了
/***
* 通过反射获取时长
*/
Drawable
.
ConstantState
state
=
gifDrawable
.
getConstantState
();
if
(
state
!=
null
)
{
//不能混淆GifFrameLoader和GifState类
Object
gifFrameLoader
=
getValue
(
state
,
"frameLoader"
);
if
(
gifFrameLoader
!=
null
)
{
Object
decoder
=
getValue
(
gifFrameLoader
,
"gifDecoder"
);
if
(
decoder
!=
null
&&
decoder
instanceof
GifDecoder
)
{
for
(
int
i
=
0
;
i
<
gifDrawable
.
getFrameCount
();
i
++)
{
duration
+=
((
GifDecoder
)
decoder
).
getDelay
(
i
);
}
}
}
Log
.
e
(
"Glide4.7.1"
,
"gif播放一次动画时长:"
+
duration
);
}
}
catch
(
Throwable
e
)
{
}
}
/**
* 通过字段名从对象或对象的父类中得到字段的值
*
* @param object 对象实例
* @param fieldName 字段名
* @return 字段对应的值
* @throws Exception
*/
public
static
Object
getValue
(
Object
object
,
String
fieldName
)
throws
Exception
{
if
(
object
==
null
)
{
return
null
;
}
if
(
TextUtils
.
isEmpty
(
fieldName
))
{
return
null
;
}
Field
field
=
null
;
Class
<?>
clazz
=
object
.
getClass
();
for
(;
clazz
!=
Object
.
class
;
clazz
=
clazz
.
getSuperclass
())
{
try
{
field
=
clazz
.
getDeclaredField
(
fieldName
);
field
.
setAccessible
(
true
);
return
field
.
get
(
object
);
}
catch
(
Exception
e
)
{
//这里甚么都不要做!并且这里的异常必须这样写,不能抛出去。
//如果这里的异常打印或者往外抛,则就不会执行clazz = clazz.getSuperclass(),最后就不会进入到父类中了
}
}
return
null
;
}
}
Utils/src/main/java/com/base/utils/ui/image/glide/ProgressInterceptor.java
deleted
100644 → 0
View file @
6c1c0633
package
com
.
base
.
utils
.
ui
.
image
.
glide
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.Map
;
import
okhttp3.Interceptor
;
import
okhttp3.Request
;
import
okhttp3.Response
;
import
okhttp3.ResponseBody
;
/**
* @author guolin
* @since 2017/11/5
*/
public
class
ProgressInterceptor
implements
Interceptor
{
static
final
Map
<
String
,
ProgressListener
>
LISTENER_MAP
=
new
HashMap
<>();
public
static
void
addListener
(
String
url
,
ProgressListener
listener
)
{
LISTENER_MAP
.
put
(
url
,
listener
);
}
public
static
void
removeListener
(
String
url
)
{
LISTENER_MAP
.
remove
(
url
);
}
@Override
public
Response
intercept
(
Chain
chain
)
throws
IOException
{
Request
request
=
chain
.
request
();
Response
response
=
chain
.
proceed
(
request
);
String
url
=
request
.
url
().
toString
();
ResponseBody
body
=
response
.
body
();
Response
newResponse
=
response
.
newBuilder
().
body
(
new
ProgressResponseBody
(
url
,
body
)).
build
();
return
newResponse
;
}
}
Utils/src/main/java/com/base/utils/ui/image/glide/ProgressListener.java
deleted
100644 → 0
View file @
6c1c0633
package
com
.
base
.
utils
.
ui
.
image
.
glide
;
/**
* @author guolin
* @since 2017/11/5
*/
public
interface
ProgressListener
{
/**
* 当下载进度发生变化时,会回调此方法。
* @param progress
* 当前的下载进度,参数值的范围是0-100。
*/
void
onProgress
(
int
progress
);
}
\ No newline at end of file
Utils/src/main/java/com/base/utils/ui/image/glide/ProgressResponseBody.java
deleted
100644 → 0
View file @
6c1c0633
package
com
.
base
.
utils
.
ui
.
image
.
glide
;
import
android.util.Log
;
import
java.io.IOException
;
import
okhttp3.MediaType
;
import
okhttp3.ResponseBody
;
import
okio.Buffer
;
import
okio.BufferedSource
;
import
okio.ForwardingSource
;
import
okio.Okio
;
import
okio.Source
;
/**
* @author guolin
* @since 2017/11/5
*/
public
class
ProgressResponseBody
extends
ResponseBody
{
private
static
final
String
TAG
=
"ProgressResponseBody"
;
private
BufferedSource
bufferedSource
;
private
ResponseBody
responseBody
;
private
ProgressListener
listener
;
public
ProgressResponseBody
(
String
url
,
ResponseBody
responseBody
)
{
this
.
responseBody
=
responseBody
;
listener
=
ProgressInterceptor
.
LISTENER_MAP
.
get
(
url
);
}
@Override
public
MediaType
contentType
()
{
return
responseBody
.
contentType
();
}
@Override
public
long
contentLength
()
{
return
responseBody
.
contentLength
();
}
@Override
public
BufferedSource
source
()
{
if
(
bufferedSource
==
null
)
{
bufferedSource
=
Okio
.
buffer
(
new
ProgressSource
(
responseBody
.
source
()));
}
return
bufferedSource
;
}
private
class
ProgressSource
extends
ForwardingSource
{
long
totalBytesRead
=
0
;
int
currentProgress
;
ProgressSource
(
Source
source
)
{
super
(
source
);
}
@Override
public
long
read
(
Buffer
sink
,
long
byteCount
)
throws
IOException
{
long
bytesRead
=
super
.
read
(
sink
,
byteCount
);
long
fullLength
=
responseBody
.
contentLength
();
if
(
bytesRead
==
-
1
)
{
totalBytesRead
=
fullLength
;
}
else
{
totalBytesRead
+=
bytesRead
;
}
int
progress
=
(
int
)
(
100
f
*
totalBytesRead
/
fullLength
);
Log
.
d
(
TAG
,
"download progress is "
+
progress
);
if
(
listener
!=
null
&&
progress
!=
currentProgress
)
{
listener
.
onProgress
(
progress
);
}
if
(
listener
!=
null
&&
totalBytesRead
==
fullLength
)
{
listener
=
null
;
}
currentProgress
=
progress
;
return
bytesRead
;
}
}
}
build.gradle
View file @
1f0788ff
...
@@ -50,7 +50,7 @@ ext {
...
@@ -50,7 +50,7 @@ ext {
okHttpVersion
=
'3.8.1'
//okHttp
okHttpVersion
=
'3.8.1'
//okHttp
gsonVersion
=
'2.8.2'
//gson
gsonVersion
=
'2.8.2'
//gson
glideVersion
=
'
4.9
.0'
//glide
glideVersion
=
'
3.7
.0'
//glide
eventBusVersion
=
'3.0.0'
//事件部线
eventBusVersion
=
'3.0.0'
//事件部线
quickAdapterVersion
=
'2.9.42'
//baseQuickAdapter
quickAdapterVersion
=
'2.9.42'
//baseQuickAdapter
wechatPayVersion
=
'5.3.1'
//微信支付
wechatPayVersion
=
'5.3.1'
//微信支付
...
...
settings.gradle
View file @
1f0788ff
//include ':Chat'
include
':RvFrame'
include
':RvFrame'
include
':RvTravel'
include
':RvTravel'
include
':RvClient'
include
':RvClient'
include
':RvWrapper'
include
':RvWrapper'
include
':RvHome'
include
':RvHome'
//
include
':Animset'
include
':Animset'
include
':OkGo'
include
':OkGo'
include
':SweetDialog'
include
':SweetDialog'
include
':Resource'
include
':Resource'
include
':Utils'
include
':Utils'
//include ':Baas'
//include ':MIMC'
//include ':UMPush'
//include ':Bugly'
include
':MyFrame'
include
':MyFrame'
//include ':Collector'
//include ':GuardClient'
//include ':Compex'
//include ':MedicalBase'
//include ':UpYunsMedicalClient'
//include ':UpYunsMedicalMatters'
//include ':Banner'
//include ':BannerSimple'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment