Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fastdevelop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高超
fastdevelop
Commits
cf5feab0
Commit
cf5feab0
authored
Mar 06, 2020
by
gao.chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
picasso升级
parent
6ae24f86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
fastDevelop/build.gradle
+1
-1
fastDevelop/src/main/java/com/mayi/fastdevelop/base/BaseApplication.java
+10
-0
No files found.
fastDevelop/build.gradle
View file @
cf5feab0
...
@@ -42,7 +42,7 @@ dependencies {
...
@@ -42,7 +42,7 @@ dependencies {
api
'com.scwang.smartrefresh:SmartRefreshLayout:1.0.3'
//下拉刷新,加载更多
api
'com.scwang.smartrefresh:SmartRefreshLayout:1.0.3'
//下拉刷新,加载更多
api
'com.youth.banner:banner:1.4.10'
//图片轮播控件
api
'com.youth.banner:banner:1.4.10'
//图片轮播控件
api
'com.squareup.okhttp3:okhttp:4.3.1'
api
'com.squareup.okhttp3:okhttp:4.3.1'
api
'com.squareup.picasso:picasso:2.
5.2
'
//图片加载
api
'com.squareup.picasso:picasso:2.
71828
'
//图片加载
api
'com.tencent.bugly:crashreport_upgrade:1.3.4'
api
'com.tencent.bugly:crashreport_upgrade:1.3.4'
api
'com.tencent.bugly:nativecrashreport:3.6.0.1'
api
'com.tencent.bugly:nativecrashreport:3.6.0.1'
api
'com.orhanobut:logger:2.2.0'
api
'com.orhanobut:logger:2.2.0'
...
...
fastDevelop/src/main/java/com/mayi/fastdevelop/base/BaseApplication.java
View file @
cf5feab0
...
@@ -3,6 +3,7 @@ package com.mayi.fastdevelop.base;
...
@@ -3,6 +3,7 @@ package com.mayi.fastdevelop.base;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.app.Application
;
import
android.app.Application
;
import
android.content.Context
;
import
android.content.Context
;
import
android.graphics.Bitmap
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Environment
;
import
android.os.Environment
;
import
android.os.Handler
;
import
android.os.Handler
;
...
@@ -31,9 +32,12 @@ import com.scwang.smartrefresh.layout.api.RefreshLayout;
...
@@ -31,9 +32,12 @@ import com.scwang.smartrefresh.layout.api.RefreshLayout;
import
com.scwang.smartrefresh.layout.constant.SpinnerStyle
;
import
com.scwang.smartrefresh.layout.constant.SpinnerStyle
;
import
com.scwang.smartrefresh.layout.footer.ClassicsFooter
;
import
com.scwang.smartrefresh.layout.footer.ClassicsFooter
;
import
com.scwang.smartrefresh.layout.header.ClassicsHeader
;
import
com.scwang.smartrefresh.layout.header.ClassicsHeader
;
import
com.squareup.picasso.OkHttp3Downloader
;
import
com.squareup.picasso.Picasso
;
import
com.tencent.bugly.crashreport.CrashReport
;
import
com.tencent.bugly.crashreport.CrashReport
;
import
com.tencent.mmkv.MMKV
;
import
com.tencent.mmkv.MMKV
;
import
java.io.File
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -54,6 +58,12 @@ public abstract class BaseApplication extends MultiDexApplication {
...
@@ -54,6 +58,12 @@ public abstract class BaseApplication extends MultiDexApplication {
initSmartRefreshLayout
();
initSmartRefreshLayout
();
MMKV
.
initialize
(
this
);
MMKV
.
initialize
(
this
);
HttpProxy
.
getInstance
().
init
(
new
OKHttpModel
());
HttpProxy
.
getInstance
().
init
(
new
OKHttpModel
());
File
externalFilesDir
=
getExternalFilesDir
(
Environment
.
DIRECTORY_PICTURES
);
Picasso
picasso
=
new
Picasso
.
Builder
(
this
)
.
downloader
(
new
OkHttp3Downloader
(
externalFilesDir
))
//设置disk缓存
.
defaultBitmapConfig
(
Bitmap
.
Config
.
RGB_565
)
// 设置全局的图片样式
.
build
();
Picasso
.
setSingletonInstance
(
picasso
);
}
}
private
void
initSmartRefreshLayout
()
{
private
void
initSmartRefreshLayout
()
{
...
...
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